From 93d9f09fcc80fe662d72f9051c24201d0a2e7c61 Mon Sep 17 00:00:00 2001 From: Shannon Date: Tue, 16 Feb 2016 14:20:29 +0100 Subject: [PATCH] U4-7953 Creating Templates via new DocType have camelCased aliases, but from the Template section have PascalCase aliases --- src/Umbraco.Core/Services/FileService.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Core/Services/FileService.cs b/src/Umbraco.Core/Services/FileService.cs index 7b558614f4..e4cbb0b410 100644 --- a/src/Umbraco.Core/Services/FileService.cs +++ b/src/Umbraco.Core/Services/FileService.cs @@ -255,7 +255,12 @@ namespace Umbraco.Core.Services /// public Attempt> CreateTemplateForContentType(string contentTypeAlias, string contentTypeName, int userId = 0) { - var template = new Template(contentTypeName, contentTypeAlias); + var template = new Template(contentTypeName, + //NOTE: We are NOT passing in the content type alias here, we want to use it's name since we don't + // want to save template file names as camelCase, the Template ctor will clean the alias as + // `alias.ToCleanString(CleanStringType.UnderscoreAlias)` which has been the default. + // This fixes: http://issues.umbraco.org/issue/U4-7953 + contentTypeName); var evtMsgs = EventMessagesFactory.Get();