1- using System . Collections . Concurrent ;
1+ using System . Collections . Concurrent ;
22using Umbraco . Cms . Core . Cache ;
33using Umbraco . Cms . Core . Collections ;
44using Umbraco . Cms . Core . Models ;
@@ -21,6 +21,8 @@ internal sealed class PublishedProperty : PublishedPropertyBase
2121 private readonly ContentVariation _variations ;
2222 private readonly ContentVariation _sourceVariations ;
2323
24+ private readonly string _propertyTypeAlias ;
25+
2426 // the variant and non-variant object values
2527 private bool _interInitialized ;
2628 private object ? _interValue ;
@@ -71,6 +73,8 @@ public PublishedProperty(
7173 // it must be set to the union of variance (the combination of content type and property type variance).
7274 _variations = propertyType . Variations | content . ContentType . Variations ;
7375 _sourceVariations = propertyType . Variations ;
76+
77+ _propertyTypeAlias = propertyType . Alias ;
7478 }
7579
7680 // used to cache the CacheValues of this property
@@ -89,7 +93,7 @@ private static string PropertyCacheValues(Guid contentUid, string typeAlias, boo
8993 // determines whether a property has value
9094 public override bool HasValue ( string ? culture = null , string ? segment = null )
9195 {
92- _content . VariationContextAccessor . ContextualizeVariation ( _variations , _content . Id , ref culture , ref segment ) ;
96+ _content . VariationContextAccessor . ContextualizeVariation ( _variations , _content . Id , _propertyTypeAlias , ref culture , ref segment ) ;
9397
9498 var value = GetSourceValue ( culture , segment ) ;
9599 var hasValue = PropertyType . IsValue ( value , PropertyValueLevel . Source ) ;
@@ -103,7 +107,7 @@ public override bool HasValue(string? culture = null, string? segment = null)
103107
104108 public override object ? GetSourceValue ( string ? culture = null , string ? segment = null )
105109 {
106- _content . VariationContextAccessor . ContextualizeVariation ( _sourceVariations , _content . Id , ref culture , ref segment ) ;
110+ _content . VariationContextAccessor . ContextualizeVariation ( _sourceVariations , _content . Id , _propertyTypeAlias , ref culture , ref segment ) ;
107111
108112 // source values are tightly bound to the property/schema culture and segment configurations, so we need to
109113 // sanitize the contextualized culture/segment states before using them to access the source values.
@@ -146,7 +150,7 @@ public override bool HasValue(string? culture = null, string? segment = null)
146150
147151 public override object ? GetValue ( string ? culture = null , string ? segment = null )
148152 {
149- _content . VariationContextAccessor . ContextualizeVariation ( _variations , _content . Id , ref culture , ref segment ) ;
153+ _content . VariationContextAccessor . ContextualizeVariation ( _variations , _content . Id , _propertyTypeAlias , ref culture , ref segment ) ;
150154
151155 object ? value ;
152156 CacheValue cacheValues = GetCacheValues ( PropertyType . CacheLevel ) . For ( culture , segment ) ;
@@ -209,7 +213,7 @@ private CacheValues GetCacheValues(IAppCache? cache)
209213
210214 public override object ? GetDeliveryApiValue ( bool expanding , string ? culture = null , string ? segment = null )
211215 {
212- _content . VariationContextAccessor . ContextualizeVariation ( _variations , _content . Id , ref culture , ref segment ) ;
216+ _content . VariationContextAccessor . ContextualizeVariation ( _variations , _content . Id , _propertyTypeAlias , ref culture , ref segment ) ;
213217
214218 object ? value ;
215219 CacheValue cacheValues = GetCacheValues ( expanding ? PropertyType . DeliveryApiCacheLevelForExpansion : PropertyType . DeliveryApiCacheLevel ) . For ( culture , segment ) ;
0 commit comments