Skip to content

Commit 1605dc1

Browse files
11048: Bugfix for groups and properties that get replaced (#11257)
1 parent 3f5d9df commit 1605dc1

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/Umbraco.Web.UI.Client/src/common/services/contenttypehelper.service.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ function contentTypeHelper(contentTypeResource, dataTypeResource, $filter, $inje
9696
group.convertingToTab = true;
9797

9898
group.type = this.TYPE_TAB;
99-
99+
100100
const newAlias = this.generateLocalAlias(group.name);
101101
// when checking for alias uniqueness we need to exclude the current group or the alias would get a + 1
102102
const otherGroups = [...groups].filter(groupCopy => !groupCopy.convertingToTab);
@@ -445,6 +445,12 @@ function contentTypeHelper(contentTypeResource, dataTypeResource, $filter, $inje
445445
// The saved content type might have updated values (eg. new IDs/keys), so make sure the view model is updated
446446
contentType.ModelState = savedContentType.ModelState;
447447
contentType.id = savedContentType.id;
448+
449+
// Prevent rebinding if there was an error: https://github.com/umbraco/Umbraco-CMS/pull/11257
450+
if (savedContentType.ModelState) {
451+
return;
452+
}
453+
448454
contentType.groups.forEach(function (group) {
449455
if (!group.alias) return;
450456

0 commit comments

Comments
 (0)