Kentico 7, publishing does not respect "Publish From"

Nimrod Petersen asked on March 9, 2015 22:27

I have a deployment using kentico 7 and user complaint is that when they create a new page (it gets automatically published on edit - no approval) and publish date from is set to some future time, it is not respected by the CMS: documents is still published (no 404) after setting published date. On the other hand if publish from date is set to the past time, document gets unpublished. What is the proper sequence if user actions for the CMS to respect "Publish from" date. The expected behavior is:

  1. Page is created and saved - it is in published state until step 2 is complete.
  2. Publish from is set to a future time - page / document gets unpublished
  3. The CMS waits for the date set in step 2 and publishes the document on that date automatically.

Correct Answer

Juraj Ondrus answered on March 11, 2015 14:19

Hi,

There is often confusion between workflow approval process and content scheduling. I believe it is well explained in this article.

0 votesVote for this answer Unmark Correct answer

Recent Answers


Richard Sustek answered on March 10, 2015 08:02

Hi Rafal,

Thank you for your message.

Are you sure that your editors who created the page are not viewing the document in preview mode? If you are editor or a global administrator you can see all pages, even the unpublished ones. Can you advice them to either close the preview mode or log out? I'm sure that once they log out they will not be able to see the unpublished documents. Also to be sure that a document is not published you should see the "red" circle next to the Document name in the content tree, is this your case too?

Kind regards,

Richard Sustek.

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on March 10, 2015 12:42

If the user is not setting a publish from date initially, the page will be published. If the user goes back and makes a change or simply sets a publish from date, then from the date they entered forward the new content will be published, like a new version of it. For instance, I created a page at 7am yesterday without a publish from date in it. I realized at 9am that the page was showing, so I updated the page and set a publish from = tomorrow at 9am and saved. The version I created at 7am yesterday will show until the new version I have set to publish at 9am tomorrow.

The key is to ALWAYS set the publish from date prior to saving or publishing initially. If you don't you will have to Archive the document, set the publish from date, then save/publish again.

0 votesVote for this answer Mark as a Correct answer

Nimrod Petersen answered on March 10, 2015 15:10 (last edited on March 10, 2015 15:12)

Richard: I am absolutely sure, the page gets published, I reproed it in Incognito mode, the page is available for any user, not just editor.

If I have a default workflow which publishes page on creation / edit I don't think there is any way to add publish from date before page is created, CMS UI does not allow it? Am I right?

Edit: lest me test the approach with archiving suggested by Brenden.

0 votesVote for this answer Mark as a Correct answer

Nimrod Petersen answered on March 10, 2015 15:23 (last edited on March 10, 2015 15:25)

Brenden,

I did the following steps: 1. Create a page - page gets published and is available for everyone.

  1. Archive the page - users get 404
  2. Set Publish from date to some future time, say today at 9:05am and hit " Save" - users still get 404
  3. At 9:10 (so after "publish from" time/date), users still get 404
  4. At 9:11 hit Save again, page gets published - users see the page (not 404)

I am not sure if it works as designed but this is not a solution my user is looking for. She is looking to set the publish date and not be forced to go back to the page again to hit save (step 4).

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on March 10, 2015 16:28

There is a scheduled task for the site which publishes the content, check that to see that is it running as expected. I believe it is set for every minute by default. The page could be cached as well.

0 votesVote for this answer Mark as a Correct answer

Nimrod Petersen answered on March 10, 2015 17:12

My Publishing job is working without issues according to admin section (every minute). I did hard browser refresh (ctrl + f5) and I did iisreset too.

The question is: if a document IS published, should Kentico archive / unpublish it if I change it and set the "Publish From" in the future? The scenario is: editor creates a page and they want it to be visible only after a set date.

0 votesVote for this answer Mark as a Correct answer

Nimrod Petersen answered on March 11, 2015 15:08

Juraj,

The write up on differences between approval process and content scheduling was able to help me fix my problem, I appreciate it!

Just to summarize the steps I took to achieve what my user needs (document shows up on the site after/at some arbitrary date X in the future):

  1. Create a page / document.
  2. Set "Publish To" value to some date in the past and click "Save" <-- document gets unpublished.
  3. Clear "Publish To" value and set "Publish From" to desired datetime X, hit "Save".
  4. When X is reached, the document gets published.
1 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.