This commit is contained in:
Stephan
2018-05-08 16:41:37 +02:00
parent b1faade9b0
commit 6d1f42c9b6
3 changed files with 7 additions and 4 deletions

View File

@@ -91,8 +91,10 @@ namespace Umbraco.Web.PublishedCache.NuCache
{
ContextualizeVariation(ref culture, ref segment);
return _sourceValue != null &&
(!(_sourceValue is string) || string.IsNullOrWhiteSpace((string) _sourceValue) == false);
var sourceValue = GetSourceValue(culture, segment);
return sourceValue != null &&
(!(sourceValue is string) || string.IsNullOrWhiteSpace((string) sourceValue) == false);
}
// used to cache the CacheValues of this property

View File

@@ -1155,9 +1155,10 @@ namespace Umbraco.Web.PublishedCache.NuCache
var pdatas = new List<PropertyData>();
foreach (var pvalue in prop.Values)
{
// note: at service level, invariant is 'null', but here invariant becomes 'string.Empty'
var value = published ? pvalue.PublishedValue : pvalue.EditedValue;
if (value != null)
pdatas.Add(new PropertyData { Culture = pvalue.Culture, Segment = pvalue.Segment, Value = value });
pdatas.Add(new PropertyData { Culture = pvalue.Culture ?? string.Empty, Segment = pvalue.Segment ?? string.Empty, Value = value });
//Core.Composing.Current.Logger.Debug<PublishedSnapshotService>($"{content.Id} {prop.Alias} [{pvalue.LanguageId},{pvalue.Segment}] {value} {(published?"pub":"edit")}");