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(
|
||||
settings => {
|
||||
var context = CreateShellContext(settings);
|
||||
context.Shell.Activate();
|
||||
_runningShellTable.Add(settings);
|
||||
ActivateShell(context);
|
||||
return context;
|
||||
});
|
||||
}
|
||||
|
||||
var setupContext = CreateSetupContext();
|
||||
setupContext.Shell.Activate();
|
||||
_runningShellTable.Add(setupContext.Settings);
|
||||
ActivateShell(setupContext);
|
||||
return new[] { setupContext };
|
||||
}
|
||||
|
||||
private void ActivateShell(ShellContext context) {
|
||||
context.Shell.Activate();
|
||||
_runningShellTable.Add(context.Settings);
|
||||
HackSimulateExtensionActivation(context.LifetimeScope);
|
||||
}
|
||||
|
||||
ShellContext CreateSetupContext() {
|
||||
Logger.Debug("Creating shell context for root setup");
|
||||
return _shellContextFactory.CreateSetupContext(new ShellSettings { Name = "Default" });
|
||||
|
Loading…
Reference in New Issue
Block a user