diff --git a/src/Umbraco.Core/Models/ContentRepositoryExtensions.cs b/src/Umbraco.Core/Models/ContentRepositoryExtensions.cs index 5b7d68a72b..24fd7847b4 100644 --- a/src/Umbraco.Core/Models/ContentRepositoryExtensions.cs +++ b/src/Umbraco.Core/Models/ContentRepositoryExtensions.cs @@ -174,15 +174,17 @@ public static class ContentRepositoryExtensions foreach (IProperty property in content.Properties) { // each property type may or may not support the variation - if (!property.PropertyType?.SupportsVariation(culture, "*", true) ?? false) + if ((!property.PropertyType?.SupportsVariation(culture, "*", true) ?? false) && + !(property.PropertyType?.Variations == ContentVariation.Nothing)) { continue; } foreach (IPropertyValue pvalue in property.Values) { - if ((property.PropertyType?.SupportsVariation(pvalue.Culture, pvalue.Segment, true) ?? false) && - (culture == "*" || (pvalue.Culture?.InvariantEquals(culture) ?? false))) + if (((property.PropertyType?.SupportsVariation(pvalue.Culture, pvalue.Segment, true) ?? false) && + (culture == "*" || (pvalue.Culture?.InvariantEquals(culture) ?? false))) || + property.PropertyType?.Variations == ContentVariation.Nothing) { property.SetValue(null, pvalue.Culture, pvalue.Segment); } @@ -193,7 +195,8 @@ public static class ContentRepositoryExtensions IPropertyCollection otherProperties = other.Properties; foreach (IProperty otherProperty in otherProperties) { - if (!otherProperty?.PropertyType?.SupportsVariation(culture, "*", true) ?? true) + if ((!otherProperty?.PropertyType?.SupportsVariation(culture, "*", true) ?? true) && + !(otherProperty?.PropertyType?.Variations == ContentVariation.Nothing)) { continue; } @@ -203,8 +206,9 @@ public static class ContentRepositoryExtensions { foreach (IPropertyValue pvalue in otherProperty.Values) { - if (otherProperty.PropertyType.SupportsVariation(pvalue.Culture, pvalue.Segment, true) && - (culture == "*" || (pvalue.Culture?.InvariantEquals(culture) ?? false))) + if (((otherProperty?.PropertyType.SupportsVariation(pvalue.Culture, pvalue.Segment, true) ?? false) && + (culture == "*" ||(pvalue.Culture?.InvariantEquals(culture) ?? false))) || + otherProperty?.PropertyType?.Variations == ContentVariation.Nothing) { var value = published ? pvalue.PublishedValue : pvalue.EditedValue; content.SetValue(alias, value, pvalue.Culture, pvalue.Segment);