Skip to content

Commit 9b46c54

Browse files
committed
Fixes issue with template model and package installation - need to backport this to the dev branch!
1 parent ad268ca commit 9b46c54

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/Umbraco.Core/Models/Template.cs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ public Template(string name, string alias)
3838
_alias = alias.ToCleanString(CleanStringType.UnderscoreAlias);
3939
_masterTemplateId = new Lazy<int>(() => -1);
4040
_viewFileSystem = new PhysicalFileSystem(SystemDirectories.MvcViews);
41+
_masterPageFileSystem = new PhysicalFileSystem(SystemDirectories.Masterpages);
4142
_templateConfig = UmbracoConfig.For.UmbracoSettings().Templates;
4243
}
4344

@@ -46,18 +47,16 @@ public Template(string name, string alias, IFileSystem viewFileSystem, IFileSyst
4647
{
4748
if (viewFileSystem == null) throw new ArgumentNullException("viewFileSystem");
4849
if (masterPageFileSystem == null) throw new ArgumentNullException("masterPageFileSystem");
50+
if (templateConfig == null) throw new ArgumentNullException("templateConfig");
4951
_viewFileSystem = viewFileSystem;
5052
_masterPageFileSystem = masterPageFileSystem;
5153
_templateConfig = templateConfig;
5254
}
5355

5456
[Obsolete("This constructor should not be used, file path is determined by alias, setting the path here will have no affect")]
5557
public Template(string path, string name, string alias)
56-
: base(path)
57-
{
58-
_name = name;
59-
_alias = alias.ToCleanString(CleanStringType.UnderscoreAlias);
60-
_masterTemplateId = new Lazy<int>(() => -1);
58+
: this(name, alias)
59+
{
6160
}
6261

6362
[DataMember]

0 commit comments

Comments
 (0)