fixed: installer cant install macros
This commit is contained in:
@@ -624,9 +624,13 @@ namespace umbraco.cms.businesslogic.packager
|
||||
{
|
||||
try
|
||||
{
|
||||
var m = new Macro(alias);
|
||||
this.ContainsMacroConflict = true;
|
||||
this._conflictingMacroAliases.Add(m.Name, alias);
|
||||
var m = Macro.GetByAlias(alias);
|
||||
|
||||
if (m != null)
|
||||
{
|
||||
this.ContainsMacroConflict = true;
|
||||
this._conflictingMacroAliases.Add(m.Name, alias);
|
||||
}
|
||||
}
|
||||
catch (IndexOutOfRangeException) { } //thrown when the alias doesn't exist in the DB, ie - macro not there
|
||||
}
|
||||
|
||||
@@ -254,7 +254,10 @@ namespace umbraco.cms.businesslogic.macro
|
||||
var alias = XmlHelper.GetNodeValue(n.SelectSingleNode("alias"));
|
||||
//check to see if the macro alreay exists in the system
|
||||
//it's better if it does and we keep using it, alias *should* be unique remember
|
||||
|
||||
var m = Macro.GetByAlias(alias);
|
||||
|
||||
|
||||
if (m == null)
|
||||
{
|
||||
m = MakeNew(XmlHelper.GetNodeValue(n.SelectSingleNode("name")));
|
||||
@@ -432,7 +435,7 @@ namespace umbraco.cms.businesslogic.macro
|
||||
TimeSpan.FromMinutes(30),
|
||||
() =>
|
||||
{
|
||||
var macro = ApplicationContext.Current.Services.MacroService.GetByAlias(alias);
|
||||
var macro = ApplicationContext.Current.Services.MacroService.GetByAlias(alias);
|
||||
if (macro == null) return null;
|
||||
return new Macro(macro);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user