Try our conversational search powered by Generative AI!

Published page, expired, then unexpired and set for future publish shows on the site


I was looking for an answer and came across this comment which doesn't seem to work in Epi 11 anymore:

I'm finding that if you previously publish a page, you can't go back and set the scheduled publish because the page will always show on the site. The only option is to expire the content so it doesn't show on the site, but now you can't schedule the publish because of the error "Expiration date cannot be prior to the published date." It will require a manual publish in the future to remove the expiration and live publish the content.

Steps to reproduce:

  1. Create a page
  2. View the page on the site to make sure it's visible
  3. (optional) Expire the content
  4. (optional) View the page on the site to make sure that it's no longer visible (may need to log out)
  5. (optional) Remove the expiration date of the page
  6. (optional) View the page on the site to make sure it's visible again
  7. Schedule the page for publish in the future
  8. View the page on the site to find out that even though it's scheduled for the future, it's available for the public right now

I have the following code in place to hopefully catch unpublished content, but once it's published it always has a publish date. It's based on

return allItems.Where(x => !x.IsDeleted && _publishState.Service.IsPublished(x, PagePublishedStatus.Published));

How can I get the content to not show when it is scheduled for publish regardless if it was previously published or not?

Feb 26, 2020 21:31

Hi Nick

I came across this post as I experienced the same problem. I have raised it with Optimizely Support, with link to your observations.

Feb 14, 2022 9:41

Support mentioned that the feature is by design. Here are the steps to fix this:

  1. When the content is Expired, change the publication date to a future date/time. A validation error will occur, prohibiting publication.
  2. Remove expiration date/time.
  3. Publish the page and notice that the page is set to publish in the future. Verify that browsing to the page, shows you a 404 page.
Feb 18, 2022 17:03

Hi Nick, Stefan

I just encountered a similar scenario and while trying to understand how the Published property change on a page actually works, this is what i found : If you have a page already published and you go in and change the Published property to a future date and Publish again, now you would see a yellow bar on top indicating the publishing change and if you try browsing the page now, it throws 404, even though it was previously published. And this change doesn't need any job to publish the page. It will auto publish at the specified date time.

Which now brings me to a question : why would anyone use Schedule for Publish option and wait for a job to publish content when an automatic future publishing can be achieved by modifying the Published date property on page? Thoughts?

May 11, 2022 15:18
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.