From 31eea2a2a8a3bb1981984f3730075162d645ec14 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Tue, 12 Mar 2019 08:17:09 +0100 Subject: [PATCH] Fixed issue when creating variant content templates, but the properties is invariant. Before this change an exception was thrown --- src/Umbraco.Core/Services/Implement/ContentService.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Core/Services/Implement/ContentService.cs b/src/Umbraco.Core/Services/Implement/ContentService.cs index cc962fbe22..f2bef52922 100644 --- a/src/Umbraco.Core/Services/Implement/ContentService.cs +++ b/src/Umbraco.Core/Services/Implement/ContentService.cs @@ -2875,7 +2875,14 @@ namespace Umbraco.Core.Services.Implement { foreach (var property in blueprint.Properties) { - content.SetValue(property.Alias, property.GetValue(culture), culture); + if (property.PropertyType.VariesByCulture()) + { + content.SetValue(property.Alias, property.GetValue(culture), culture); + } + else + { + content.SetValue(property.Alias, property.GetValue()); + } } content.Name = blueprint.Name;