fixed regression issue which was preventing proper handling of situations where module assembly is missing
This commit is contained in:
parent
5080040590
commit
bcc00a2dbb
@ -447,18 +447,15 @@
|
||||
module.ControlTitle = "";
|
||||
module.Actions = "";
|
||||
module.UseAdminContainer = false;
|
||||
module.PaneModuleIndex = -1;
|
||||
module.PaneModuleCount = 0;
|
||||
|
||||
if ((module.PageId == page.PageId || module.ModuleId == moduleid) && module.ModuleDefinition != null)
|
||||
if ((module.PageId == page.PageId || module.ModuleId == moduleid))
|
||||
{
|
||||
var typename = string.Empty;
|
||||
var typename = Constants.ErrorModule;
|
||||
if (module.ModuleDefinition != null && (module.ModuleDefinition.Runtimes == "" || module.ModuleDefinition.Runtimes.Contains(GetRuntime().ToString())))
|
||||
{
|
||||
typename = module.ModuleDefinition.ControlTypeTemplate;
|
||||
}
|
||||
else
|
||||
{
|
||||
typename = Constants.ErrorModule;
|
||||
}
|
||||
|
||||
// handle default action
|
||||
if (action == Constants.DefaultAction && !string.IsNullOrEmpty(module.ModuleDefinition.DefaultAction))
|
||||
@ -477,6 +474,8 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module.ModuleType = typename.Replace(Constants.ActionToken, action);
|
||||
|
||||
// get additional metadata from IModuleControl interface
|
||||
@ -535,9 +534,12 @@
|
||||
}
|
||||
|
||||
foreach (Module module in modules.Where(item => item.PageId == page.PageId))
|
||||
{
|
||||
if (paneindex.ContainsKey(module.Pane.ToLower()))
|
||||
{
|
||||
module.PaneModuleCount = paneindex[module.Pane.ToLower()] + 1;
|
||||
}
|
||||
}
|
||||
|
||||
return (page, modules);
|
||||
}
|
||||
|
Reference in New Issue
Block a user