 |
|
|
Joined: 8/1/2007
Posts: 11
|
|
|
I had a problem with a duplicate tab and we have a 30K+ line template file which I didn't really want to look through so I wrote a quick, dirty, little Perl script to find duplicate tabs. There are probably better ways of doing this, but it's 3AM and this was my first thought. Change "exportedtemplate.template" to your template's filename. After you find the problem, just search the template file for "<name>TABNAME</name>" to find the duplicates and you should be able to remove it manually or comment it out with <!-- -->
#!/usr/bin/perl
use XML::XPath;
use XML::XPath::XMLParser;
my $xp = XML::XPath->new(filename => 'exportedtemplate.template');
my $nodeset = $xp->find('/portal/tabs/tab'); # find all paragraphs
%tabs = ();
foreach my $node ($nodeset->get_nodelist) {
$name = $node->find('name')->string_value;
$parent = $node->find('parent')->string_value;
if($tabs{"$name $parent"}){
print "DUPLICATE: TABNAME=$name PARENT=$parent\n";
}
$tabs{"$name $parent"} = 1;
}
|
|
|
|
 |  |
|
|
Joined: 2/24/2009
Posts: 9
|
|
|
I am also having this issue. Did anyone figure this out?
All my portal templates have content.
I've also tried removing duplicate tabs from the .template file, but it still throws the error:
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)
|
|
|
|
 |  |
|
|
Joined: 2/24/2009
Posts: 9
|
|
|
David Yang wrote:
I am also having this issue. Did anyone figure this out?
All my portal templates have content.
I've also tried removing duplicate tabs from the .template file, but it still throws the error:
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)
Issue Resolved for me
I tried upgrading from 5.2.3 to 5.4.0 and it did not resolve the issue. Finally, I decided to rebuild the DotNetNuke Library source to add more information than "Tab exists". Specifically, I added - Throw New TabExistsException(iTabID, "Tab Exists" + "[iTabID:" + iTabID.ToString() + "], [TabPath:" + objTab.TabPath + "]") in TabController.vb line 90.
This will tell you exactly what is wrong with your template file (i.e. which tab it won't accept). Open your template file with a XML editor and you should be able to just remove the TAB node that is not playing well with your template.
Hopes this helps anyone else with the same issue.
|
|
|
|
 |  |
|
|
Joined: 12/10/2009
Posts: 21
|
|
|
I had the same issue and there were no duplicates in my template. My problem came from exporting the template. My portal version number was incorrect for some reason, it was being exported as portal version="1.0".
Since I was exporting a version 5+ portal template, the export includes the admin tabs, I'm guessing the admin tabs aren't included in the template prior to version 5. So since my portal version didn't equal 5.0 (even if you're using 5.5 for instance it has to equal 5.0 exactly), the import template process was adding the admin tabs even though they were already included in the template. So my template didn't include duplicate tabs but during import DNN was adding duplicates.
To fix this I simply had to change the portal version (the first tag in the XML) to 5.0 and all worked.
|
|
|
|
 |  |
|
|
|
Joined: 12/24/2010
Posts: 2
|
|
|
Greetings,
I got this problem resolved. I think there is no bug in DNN. By going to Admin------Pages, I verified the name of the tabs that could cause problems. I found similar tab names given under same parent page and that created problems. Alternatively, you might also check TabName in db.Tabs table for duplicate tab name under same parent. And this solved my problem.
Hope, this helps all of you.
Cheers,
Ranjit J. Vaity
+91 9769699334
|
|
|
|
|  |