Skip to content

Commit

Permalink
11048: Bugfix for groups and properties that get replaced (#11257)
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickdemooij9 authored Oct 12, 2021
1 parent 3f5d9df commit 1605dc1
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ function contentTypeHelper(contentTypeResource, dataTypeResource, $filter, $inje
group.convertingToTab = true;

group.type = this.TYPE_TAB;

const newAlias = this.generateLocalAlias(group.name);
// when checking for alias uniqueness we need to exclude the current group or the alias would get a + 1
const otherGroups = [...groups].filter(groupCopy => !groupCopy.convertingToTab);
Expand Down Expand Up @@ -445,6 +445,12 @@ function contentTypeHelper(contentTypeResource, dataTypeResource, $filter, $inje
// The saved content type might have updated values (eg. new IDs/keys), so make sure the view model is updated
contentType.ModelState = savedContentType.ModelState;
contentType.id = savedContentType.id;

// Prevent rebinding if there was an error: https://github.com/umbraco/Umbraco-CMS/pull/11257
if (savedContentType.ModelState) {
return;
}

contentType.groups.forEach(function (group) {
if (!group.alias) return;

Expand Down

0 comments on commit 1605dc1

Please sign in to comment.