From d9228c368f7b5dbad4890f29a7518d81d7f0230f Mon Sep 17 00:00:00 2001 From: Sebastiaan Janssen Date: Wed, 26 Jun 2013 20:54:36 +0200 Subject: [PATCH] Fixes U4-2404 Photo gallery broken on Azure - Since the template saving routine is doing ToSafeAlias, we should also do it when setting the default template --- src/Umbraco.Core/Services/PackagingService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Core/Services/PackagingService.cs b/src/Umbraco.Core/Services/PackagingService.cs index 92140889b8..eea61c8fc9 100644 --- a/src/Umbraco.Core/Services/PackagingService.cs +++ b/src/Umbraco.Core/Services/PackagingService.cs @@ -321,7 +321,7 @@ namespace Umbraco.Core.Services foreach (var templateElement in allowedTemplatesElement.Elements("Template")) { var alias = templateElement.Value; - var template = _fileService.GetTemplate(alias); + var template = _fileService.GetTemplate(alias.ToSafeAlias()); if (template != null) { if(allowedTemplates.Any(x => x.Id == template.Id)) continue; @@ -341,7 +341,7 @@ namespace Umbraco.Core.Services if (string.IsNullOrEmpty(defaultTemplateElement.Value) == false) { - var defaultTemplate = _fileService.GetTemplate(defaultTemplateElement.Value); + var defaultTemplate = _fileService.GetTemplate(defaultTemplateElement.Value.ToSafeAlias()); if (defaultTemplate != null) { contentType.SetDefaultTemplate(defaultTemplate);