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
* 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.