diff --git a/src/Umbraco.Core/Persistence/Repositories/ContentTypeBaseRepository.cs b/src/Umbraco.Core/Persistence/Repositories/ContentTypeBaseRepository.cs index ca52678b91..f2eaa4280b 100644 --- a/src/Umbraco.Core/Persistence/Repositories/ContentTypeBaseRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/ContentTypeBaseRepository.cs @@ -258,7 +258,7 @@ namespace Umbraco.Core.Persistence.Repositories //unless the PropertyGroupId has already been changed. foreach (var propertyType in propertyGroup.PropertyTypes) { - if(propertyType.IsPropertyDirty("PropertyGroupId") == false) + if ((propertyType.IsPropertyDirty("PropertyGroupId") && propertyType.PropertyGroupId == 0) == false) propertyType.PropertyGroupId = propertyGroup.Id; } } diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/controls/ContentTypeControlNew.ascx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/controls/ContentTypeControlNew.ascx.cs index 4a2efb2438..b8e33be1fc 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/controls/ContentTypeControlNew.ascx.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/controls/ContentTypeControlNew.ascx.cs @@ -405,6 +405,7 @@ jQuery(document).ready(function() {{ refreshDropDowns(); }}); gp = new GenericPropertyWrapper(); gp.ID = "GenericPropertyNew"; gp.Tabs = tabs; + gp.PropertyGroups = propertyTypeGroups; gp.DataTypeDefinitions = dtds; PropertyTypeNew.Controls.Add(gp); PropertyTypeNew.Controls.Add(new LiteralControl("")); @@ -414,6 +415,7 @@ jQuery(document).ready(function() {{ refreshDropDowns(); }}); gp = (GenericPropertyWrapper)PropertyTypeNew.Controls[1]; gp.ID = "GenericPropertyNew"; gp.Tabs = tabs; + gp.PropertyGroups = propertyTypeGroups; gp.DataTypeDefinitions = dtds; gp.UpdateEditControl(); gp.GenricPropertyControl.UpdateInterface(); @@ -435,14 +437,18 @@ jQuery(document).ready(function() {{ refreshDropDowns(); }}); ? tab.GetPropertyTypes(_contentType.Id, false) : propertyGroup.GetPropertyTypes(); + var propertyGroupId = tab.Id; + if (propertyGroup != null && propertyGroup.ParentId > 0) + propertyGroupId = propertyGroup.Id; + if (propertyTypes.Any()) { var propSort = new HtmlInputHidden(); - propSort.ID = "propSort_" + tab.Id.ToString() + "_Content"; + propSort.ID = "propSort_" + propertyGroupId.ToString() + "_Content"; PropertyTypes.Controls.Add(propSort); _sortLists.Add(propSort); - PropertyTypes.Controls.Add(new LiteralControl("