Support of multiple module definitions in DotNetNuke import/install.

Current version of DNN(4.0.2) doesn’t support multiple module definitions when importing templates


The issues are listed on DNN support site. By some reason comments for the issue are not allowed.


So I will post here  my suggestion how to resolve problem 3 (the imported result the page will contain duplicate modules, one for each moduledefinition).


DNN portal Template XML has <definition> element in the section.


However it does saves ModuleName instead of ModuleDef.Name.


To fix a problem the ModuleDefinition name should be saved in the <definition> element (Is it logical?)


The change should be done in  adminPortalTemplate.ascx.vb, function SerializeTabs, line ~ 464.


The similar change should be done in DNNLibraryComponentsPortalPortalController.vb function ParsePanes, , line ~1288. The code should call ModuleController.GetModuleByDefinition.


Module Definition names are expected to be unique, so there is no need to store combination of DesktopModule name and ModuleDefinition names  in the template.


Note that it will be  a breaking change, because old templates will use Module names instead of Module Definition name.
It will be required to change XML version and have code branches to support both old a new templates.


Consider that it is not a simple change, I desided not to implement it in my local DNN, but just split modules with multiple module definitions into separate modules.


I hope that future versions of DNN will address the issue.

Advertisements