Issue
The following error is detected while importing a Portal to a new DNN instance:
Error parsing Portal TemplateTab Exists at
DotNetNuke.Entities.Tabs.TabController.AddTabInternal(TabInfo objTab, Boolean includeAllTabsModules) at
DotNetNuke.Entities.Tabs.TabController.AddTab(TabInfo objTab, Boolean includeAllTabsModules) at
DotNetNuke.Entities.Tabs.TabController.DeserializeTab(XmlNode nodeTab, TabInfo objTab, Hashtable hTabs,
Int32 PortalId, Boolean IsAdminTemplate, PortalTemplateModuleAction mergeTabs, Hashtable hModules) at
DotNetNuke.Entities.Portals.PortalController.ParseTab(XmlNode nodeTab, Int32 PortalId, Boolean IsAdminTemplate,
PortalTemplateModuleAction mergeTabs, Hashtable& hModules, Hashtable& hTabs, Boolean IsNewPortal) at
DotNetNuke.Entities.Portals.PortalController.ParseTabs(XmlNode nodeTabs, Int32 PortalId, Boolean IsAdminTemplate,
PortalTemplateModuleAction mergeTabs, Boolean IsNewPortal) at
DotNetNuke.Entities.Portals.PortalController.ParseTemplate(Int32 PortalId, String TemplatePath, String TemplateFile,
Int32 AdministratorId, PortalTemplateModuleAction mergeTabs, Boolean IsNewPortal) at
DotNetNuke.Entities.Portals.PortalController.CreatePortal(String PortalName, UserInfo objAdminUser,
String Description, String KeyWords, String TemplatePath, String TemplateFile, String HomeDirectory,
String PortalAlias, String ServerPath, String ChildPath, Boolean IsChildPortal)
Root Cause
A template has a duplicate tab in the export file used. Two tabs were created with same name and path into their portals. Although it was working fine, and export finished successfully, the import process verified the duplicity and resulted in an "Already Exists" conflict.
For this type of error to be fixed, a manual search in the file is required to find the duplicate tab and remove it, so that the import can be successful. Unfortunately, there is no special software or tool to identify such issues.
Resolution
Identify duplicates in an import file by following this sequence of steps:
- Review Host > Portals page and take note of the count of pages mentioned in the failed import.
- This identifies how many pages were imported successfully (e.g. 79).
- Open the "<Export-File>.template" file in a text editor.
- Note that this is a flat XML file, which can be opened in any text editor.
- Count the total number of <tab> elements in the file (e.g. 80).
- Usually, the combination of keys <Ctrl-F> activates the Search feature in the Text Editors and will count the number of occurrences of the desired pattern.
- Look for Tab Names that are not unique in the file.
- Suggestion: use an XML tool like XML Duplicate remover to identify repeating tags or an XML Editor that facilitates to clearly view the XML nodes, like Microsoft XML Notepad.
- Remove the entire section of one of the duplicates and save the file.
- An entire section is delimited by the tags: <tab> and </tab>.
- Import the file again, this time it should be imported successfully.
- The missing tab will have to be manually created in the newly created portal.
Content Author: Hamid Wawas
Comments
0 comments
Please sign in to leave a comment.