mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-04-05 21:01:35 +08:00
Temporary fix until we get feature activation complete
In order to load the list of slugs for pages and blogs posts, we need to call "HackSimulateExtensionActivation" when a shell is activated. We had lost this call with the multi-tenancy work. --HG-- branch : dev
This commit is contained in:
parent
3f70ab177f
commit
16cc07cf7a
@ -83,18 +83,22 @@ namespace Orchard.Environment {
|
|||||||
return allSettings.Select(
|
return allSettings.Select(
|
||||||
settings => {
|
settings => {
|
||||||
var context = CreateShellContext(settings);
|
var context = CreateShellContext(settings);
|
||||||
context.Shell.Activate();
|
ActivateShell(context);
|
||||||
_runningShellTable.Add(settings);
|
|
||||||
return context;
|
return context;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
var setupContext = CreateSetupContext();
|
var setupContext = CreateSetupContext();
|
||||||
setupContext.Shell.Activate();
|
ActivateShell(setupContext);
|
||||||
_runningShellTable.Add(setupContext.Settings);
|
|
||||||
return new[] { setupContext };
|
return new[] { setupContext };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void ActivateShell(ShellContext context) {
|
||||||
|
context.Shell.Activate();
|
||||||
|
_runningShellTable.Add(context.Settings);
|
||||||
|
HackSimulateExtensionActivation(context.LifetimeScope);
|
||||||
|
}
|
||||||
|
|
||||||
ShellContext CreateSetupContext() {
|
ShellContext CreateSetupContext() {
|
||||||
Logger.Debug("Creating shell context for root setup");
|
Logger.Debug("Creating shell context for root setup");
|
||||||
return _shellContextFactory.CreateSetupContext(new ShellSettings { Name = "Default" });
|
return _shellContextFactory.CreateSetupContext(new ShellSettings { Name = "Default" });
|
||||||
|
Loading…
Reference in New Issue
Block a user