Skip to content

Commit e84f4b2

Browse files
authored
Merge pull request #11148 from umbraco/v9/bugfix/11083-nested_content_missing_properties_on_member_edit
V9/bugfix/11083 nested content missing properties on member edit
2 parents 6c1ced2 + a7d60ba commit e84f4b2

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

src/Umbraco.Web.BackOffice/PropertyEditors/NestedContentController.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
using System.Collections.Generic;
55
using System.Linq;
66
using Microsoft.AspNetCore.Mvc;
7+
using Umbraco.Cms.Core.Models;
78
using Umbraco.Cms.Core.Services;
89
using Umbraco.Cms.Web.BackOffice.Controllers;
910
using Umbraco.Cms.Web.Common.Attributes;
@@ -23,9 +24,7 @@ public NestedContentController(IContentTypeService contentTypeService)
2324
}
2425

2526
[HttpGet]
26-
public IEnumerable<object> GetContentTypes()
27-
{
28-
return _contentTypeService
27+
public IEnumerable<object> GetContentTypes() => _contentTypeService
2928
.GetAllElementTypes()
3029
.OrderBy(x => x.SortOrder)
3130
.Select(x => new
@@ -35,8 +34,7 @@ public IEnumerable<object> GetContentTypes()
3534
name = x.Name,
3635
alias = x.Alias,
3736
icon = x.Icon,
38-
tabs = x.CompositionPropertyGroups.Select(y => y.Name).Distinct()
37+
tabs = x.CompositionPropertyGroups.Where(x => x.Type == PropertyGroupType.Group && x.GetParentAlias() is null).Select(y => y.Name).Distinct()
3938
});
40-
}
4139
}
4240
}

src/Umbraco.Web.UI.Client/src/views/propertyeditors/nestedcontent/nestedcontent.controller.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,7 @@
535535
// remove all tabs except the specified tab
536536
var tabs = scaffold.variants[0].tabs;
537537
var tab = _.find(tabs, function (tab) {
538-
return tab.id !== 0 && (tab.alias.toLowerCase() === contentType.ncTabAlias.toLowerCase() || contentType.ncTabAlias === "");
538+
return tab.id !== 0 && (tab.label.toLowerCase() === contentType.ncTabAlias.toLowerCase() || contentType.ncTabAlias === "");
539539
});
540540
scaffold.variants[0].tabs = [];
541541
if (tab) {

0 commit comments

Comments
 (0)