From d6e7f83e3be32168f06ea9f93c3fb1e994812198 Mon Sep 17 00:00:00 2001 From: Kenn Jacobsen Date: Tue, 14 Jan 2025 10:39:39 +0100 Subject: [PATCH] Published Content should handle "is previewing" (#17957) --- src/Umbraco.PublishedCache.HybridCache/PublishedContent.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.PublishedCache.HybridCache/PublishedContent.cs b/src/Umbraco.PublishedCache.HybridCache/PublishedContent.cs index 757ea5cae189..79d23397e987 100644 --- a/src/Umbraco.PublishedCache.HybridCache/PublishedContent.cs +++ b/src/Umbraco.PublishedCache.HybridCache/PublishedContent.cs @@ -42,6 +42,8 @@ public PublishedContent( _urlSegment = contentData.UrlSegment; _published = contentData.Published; + IsPreviewing = preview; + var properties = new IPublishedProperty[_contentNode.ContentType.PropertyTypes.Count()]; var i = 0; foreach (IPublishedPropertyType propertyType in _contentNode.ContentType.PropertyTypes) @@ -127,7 +129,7 @@ private UmbracoObjectTypes GetObjectType() public override DateTime UpdateDate { get; } - public bool IsPreviewing { get; } = false; + public bool IsPreviewing { get; } // Needed for publishedProperty internal IVariationContextAccessor VariationContextAccessor { get; }