The expired page is still displayed

I have a problem which consists of it that the page that is not in the master language, despite setting it as expired, is still visible (sic!)

The page has several languages:
- "en" is master language and the page is active.
- "ru-RU" is set as expired

It seems that the page expiration check is based on the master language.
Call stack ExpiredRoutedContentEvaluator:

The below value of  routedContentData was passed to ExpiredRoutedContentEvaluator
    Content: {ID = 108085, Name = \\\"Name\\\", Page Type = \\\"HomePage\\\"}
    MatchedHost: {https://localhost:49928/, en-US (Primary)}
    PartialRoutedObject: null
    RemainingPath: ""
    RouteLanguage: "ru-RU"

namespace EPiServer.Web.Routing.Internal
  internal class ExpiredRoutedContentEvaluator : IRoutedContentEvaluator
    private readonly IRoutableEvaluator _routableEvaluator;

    public ExpiredRoutedContentEvaluator(IRoutableEvaluator routableEvaluator) => this._routableEvaluator = routableEvaluator;

    public Task<RoutedContentEvaluationResult> EvaluateRoutedContentAsync(
      ContentRouteData routedContentData)
      return Task.FromResult<RoutedContentEvaluationResult>(this._routableEvaluator.IsRoutable(routedContentData.Content) ? RoutedContentEvaluationResult.OK : RoutedContentEvaluationResult.NotFound);
In DefaultPublishedStateAssessor the master language is evaluated, not ru-RU which makes the site still available.
the cast content on IVersionable causes the content is in the master language.
    protected virtual bool IsPublishedCore(
      IContent content,
      PublishedStateCondition condition,
      ISet<ContentReference> checkedContent)
      if (content == null)
        throw new ArgumentNullException(nameof (content));
      if (checkedContent == null)
        checkedContent = (ISet<ContentReference>) new HashSet<ContentReference>((IEqualityComparer<ContentReference>) ContentReferenceComparer.IgnoreVersion);
      if (!condition.HasFlag((Enum) PublishedStateCondition.IgnoreDeleted) && content.IsDeleted)
        return false;
      if (content is IVersionable versionable)
        int num = this.ContentIsReplacedByProject(content) ? 1 : 0;
        DateTime requestTime = this._timeProvider.RequestTime;
        if (num == 0)
          if (versionable.IsPendingPublish || versionable.Status != VersionStatus.Published)
            return false;
          if (!condition.HasFlag((Enum) PublishedStateCondition.IgnoreStartPublish) && versionable.StartPublish.HasValue)
            DateTime? startPublish = versionable.StartPublish;
            DateTime dateTime = requestTime;
            if ((startPublish.HasValue ? (startPublish.GetValueOrDefault() > dateTime ? 1 : 0) : 0) != 0)
              return false;
        if (!condition.HasFlag((Enum) PublishedStateCondition.IgnoreStopPublish) && versionable.StopPublish.HasValue)
          DateTime? stopPublish = versionable.StopPublish;
          DateTime dateTime = requestTime;
          if ((stopPublish.HasValue ? (stopPublish.GetValueOrDefault() < dateTime ? 1 : 0) : 0) != 0)
            return false;
      if (!condition.HasFlag((Enum) PublishedStateCondition.IgnoreLinkedContentState))
        IContent fetchedContent = this.GetFetchedContent(content, (ICollection<ContentReference>) checkedContent);
        if (fetchedContent != null)
          return this.IsPublishedCore(fetchedContent, condition, checkedContent);
      return true;

Edited, Dec 09, 2022 9:43

Has anyone run into the same problem?

Dec 12, 2022 17:15

Working correctly for me on a local Foundation site -- 

  1. Created English version of a page and published it
  2. Created French version of that page and published it
  3. Viewed both versions of the page to make sure no issues
  4. Expired the French version of the page
  5. Result: French version of the page is no longer accessible

EPiServer.CMS version = 12.13.1

EPiServer.CMS.Core version = 12.9.3

Do you have any fallback languages or replacement languages set up that might affect the behavior?

Dec 14, 2022 21:01

Hi Daniel

However, did you do it on HomePage or some other type of page? My case is exactly with HomePage.

Dec 14, 2022 22:23

Same problem but only page expiration only fails for chinese pages.

We are experiencing the same issue, we have a very simple page in three languages, en, fr-fr and zh-cn (chinese). en and French work fine but the Chinese page will still show even though the page is expired, CMS UI indicates chinese page is expired (red clock visible next to page).

  • EPiServer v12.13.1
  • EPiServer.CMS.Core 12.13.1
  • RoutingOptions:
    ContentAssetsBasePath: ContentOwner
        IsUrlCacheEnabled: true
        PreferredUrlFormat: Hierarchical
        PreferredUrlFormatRedirection: None
        ShortcutRedirection: Permanent
        StrictLanguageRouting: true
        UrlCacheExpirationTime: {00:05:00}
        UsePrimaryHostForOutgoingUrls: false
        UseTrailingSlash: true
Apr 28, 2023 10:31
Edited, Apr 28, 2023 11:39
Eemgo - May 02, 2023 9:31
I have tried updating and I am now using EPiServer 12.18 (EPiServer.CMS.Core 12.14.0) but the problem persists. The problem only affects Expred pages that have a fallback language set and if the fallback language page is not Expired, in which case the original page will still show up, even though it is expired.

The release note linked above doesn't mention fallback language, is it possible this is another problem/bug or did that buxfix specifically deal with expired non master language page with/without fallback language?
* 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.