Another temporary fix for trees being unavailable after install, the context is null during upgrades in the installer, so would cause a YSOD
This commit is contained in:
@@ -32,7 +32,7 @@ namespace umbraco.presentation.install.steps
|
||||
if (!cms.businesslogic.skinning.Skinning.IsStarterKitInstalled())
|
||||
customizeSite.Visible = false;
|
||||
|
||||
var initTrees = new ApplicationTreeRegistrar();
|
||||
new ApplicationTreeRegistrar();
|
||||
}
|
||||
|
||||
#region Web Form Designer generated code
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace umbraco.BusinessLogic
|
||||
public ApplicationTreeRegistrar()
|
||||
{
|
||||
//don't do anything if the application is not configured!
|
||||
if (!ApplicationContext.Current.IsConfigured)
|
||||
if (ApplicationContext.Current == null || !ApplicationContext.Current.IsConfigured)
|
||||
return;
|
||||
|
||||
// Load all Trees by attribute and add them to the XML config
|
||||
|
||||
Reference in New Issue
Block a user