SaaS CMS has officially launched! Learn more now.

The expired page is still displayed

Vote:
 
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
 
  {EPiServer.Web.Routing.ContentRouteData}
    Content: {ID = 108085, Name = \\\"Name\\\", Page Type = \\\"HomePage\\\"}
    MatchedHost: {https://localhost:49928/, en-US (Primary)}
    PartialRoutedObject: null
    RemainingPath: ""
    RouteLanguage: "ru-RU"

ExpiredRoutedContentEvaluator:
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);
      checkedContent.Add(content.ContentLink);
      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;
    }



#292904
Edited, Dec 09, 2022 9:43
Vote:
 

Has anyone run into the same problem?

#293040
Dec 12, 2022 17:15
Vote:
 

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?

#293161
Dec 14, 2022 21:01
Vote:
 

Hi Daniel

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

#293167
Dec 14, 2022 22:23
Vote:
 

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
#300887
Apr 28, 2023 10:31
Vote:
 
#300892
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?
Vote:
 

We are experiencing the same thing, the lowest version I have seen it in is Episerver.Cms.Core 12.15.1, and as high as 12.21.0, so it is definitely not fixed in 12.14.0.

Create a page in ex English, translate it to Swedish and make sure fallback is set to English, Expire the swedish page > The Swedish page is still available to anonymous visitors.

Note: If the English version is expired, it is working as expected.

#319479
Edited, Mar 25, 2024 7:36
* 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.