0

we are using sitecore 9.0.2 with SXA 1.7.1

in our site we are adding future date in 2 fields called Publish and Unpublish which is OOB feature in sitecore to publish or unpublish item.

Publish is working fine as per future date associated with item automatically.

Unpublish is not happening automatically. Unpublish only works when author publish that item manually when that future date comes.

any thought on this highly appreciated.

Thanks a lot in advance.

1
  • Is the Sitecore automated publishing agent turned on ? Check your configs to ensure that Sitecore.Tasks.PublishAgent is enabled. The interval should be set to a value other than "00:00:00"
    – andyp
    May 27, 2019 at 12:19

1 Answer 1

2

That's why you are setting it on field called "Publishable".

It is only enabling / disabling publishing / unpublishing of that particular version in your defined time / date interval.

You still need to "publish" item / version to publish / unpublish it. I was also confused first time using this feature.

In order to make it automatic, you need to have workflow set or set up publishing agent or use Sitecron to do that for you.

Setting Publishing agent

By default Publishing agent is disabled:

<agent type="Sitecore.Tasks.PublishAgent" method="Run" interval="00:00:00">
  <param desc="source database">master</param>
  <param desc="target database">web</param>
  <param desc="mode (full or incremental)">incremental</param>
  <param desc="languages">en, da</param>
</agent>

To enable it just set interval, language and your preferred mode:

<agent type="Sitecore.Tasks.PublishAgent" method="Run" interval="00:00:30">
     <param desc="source database">master</param>
     <param desc="target database">web</param>
     <param desc="mode (full or incremental)">incremental</param>
     <param desc="languages">en, da</param>
</agent>

Agent will look into publishable settings and does publishing / unpublishing for you.

1
  • Sitecore.Tasks.PublishAgent works perfectly fine but it publishes work in progress content also where both publish and unpublish dates empty and there is no workflow associated.
    – Erwin Paul
    Jun 17, 2019 at 11:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.