Fixes #4000 - 7.13.0 Creating new node as an editor causes exception

This commit is contained in:
Sebastiaan Janssen
2019-01-08 21:32:47 +01:00
parent e0a38a4d9b
commit caf7a6a1ca

View File

@@ -349,7 +349,9 @@ namespace Umbraco.Web.Editors
var mapped = AutoMapperExtensions.MapWithUmbracoContext<IContent, ContentItemDisplay>(emptyContent, UmbracoContext);
// translate the content type name if applicable
mapped.ContentTypeName = Services.TextService.UmbracoDictionaryTranslate(mapped.ContentTypeName);
mapped.DocumentType.Name = Services.TextService.UmbracoDictionaryTranslate(mapped.DocumentType.Name);
// if your user type doesn't have access to the Settings section it would not get this property mapped
if(mapped.DocumentType != null)
mapped.DocumentType.Name = Services.TextService.UmbracoDictionaryTranslate(mapped.DocumentType.Name);
//remove this tab if it exists: umbContainerView
var containerTab = mapped.Tabs.FirstOrDefault(x => x.Alias == Constants.Conventions.PropertyGroups.ListViewGroupName);