Answered by:
Sitemap crashes SharePoint if I change URL property from "" to an actual URL

Question
-
All,
I have a weird problem. If I use the sitemap XML show below, it works fine. As you can see, I don't have a value for some links, like the marketing section. If I add any URL, such as <siteMapNode title="Marketing" url="/marketing/home.aspx">, save, and refresh SharePoint, I get a generic error, "An unexpected error has occurred." Why would this happen?
I've tried changing the blank URLs under Marketing and Products and every single one of those causes the error. I've also taken other XML sitemap examples from other people online (like from here: http://www.sharepointdiary.com/2012/01/custom-top-navigation-using-sitemap.html), used those, had them work, but then as soon as I change specific URL properties (to a varierty of URL
<siteMap>
<siteMapNode title="Container" url="" >
<siteMapNode title="Home" description="" url="/" />
<siteMapNode title="Company" description="" url="~/finance" >
<siteMapNode title="Corporate Presentation" url="~/finance/EMEA" description="" />
<siteMapNode title="Organization Charts" url="~/finance/APAC" description="" />
</siteMapNode>
<siteMapNode title="Human Resources" NoTrimming="True">
<siteMapNode title="Overview" url="/community/hr/Pages/home.aspx"/>
<siteMapNode title="Benefits" url="/community/hr/Pages/Benefits.aspx"/>
<siteMapNode title="Forms" url="/community/hr/Pages/HR Forms.aspx"/>
<siteMapNode title="Policies" url="/community/hr/Pages/Policies.aspx"/>
<siteMapNode title="Purchase Program" url="/community/hr/Pages/Purchase Program.aspx"/>
<siteMapNode title="Travel" url="/community/hr/Pages/Travel.aspx"/>
</siteMapNode>
<siteMapNode title="Products" url="" >
<siteMapNode title="Coverage Maps" url=""/>
</siteMapNode>
<siteMapNode title="Marketing" url="">
<siteMapNode title="Presentations" url="" />
<siteMapNode title="Talking Points" url="" />
<siteMapNode title="Exhibitions" url="" />
<siteMapNode title="Brand Overview" url="" />
<siteMapNode title="E-Templates" url="" />
<siteMapNode title="Logos" url="" />
<siteMapNode title="Images" url="" />
<siteMapNode title="Giveaways" url="" />
<siteMapNode title="Business Card Order Form" url=""/>
</siteMapNode>
<siteMapNode title="Security" url=""></siteMapNode>
<siteMapNode title="Departments" url="/SiteDirectory/Pages/Departments.aspx" >
<siteMapNode title="Accounting" url="/dept/Accounting/SitePages/Home.aspx" />
<siteMapNode title="Billing" url="/dept/Billing/SitePages/Home.aspx" />
<siteMapNode title="Business Development" url="/dept/BD/SitePages/Home.aspx"/>
<siteMapNode title="Customer Care" url="/dept/CC/SitePages/Home.aspx" />
<siteMapNode title="Engineering" url="/dept/engineering/SitePages/Home.aspx"/>
<siteMapNode title="IT" url="/dept/IT/SitePages/Home.aspx" />
<siteMapNode title="Legal and Procurement" url="/dept/legal/SitePages/Home.aspx"/>
<siteMapNode title="Marketing" url="/dept/marketing/SitePages/Home.aspx" />
<siteMapNode title="Product" url="/dept/ProdMgmt/SitePages/Home.aspx" />
<siteMapNode title="Sales" url="/dept/sales/SitePages/Home.aspx" />
</siteMapNode>
<siteMapNode title="Programs" url="/SiteDirectory/Pages/Teams.aspx">
<siteMapNode title="AeroKu Team Site" url="/team/AeroKu/SitePages/Home.aspx" />
<siteMapNode title="Astrium Engineering" url="/team/engineering/SitePages/Home.aspx" />
<siteMapNode title="Astrium Solutions Certification Program" url="/team/VSCP/SitePages/Home.aspx" />
<siteMapNode title="Change Control Board" url="/team/ccb/SitePages/Home.aspx"/>
<siteMapNode title="Contract Management" url="/team/Cobblestone/SitePages/Home.aspx"/>
<siteMapNode title="Engineering and Operations" url="/team/ENGOPS/SitePages/Home.aspx"/>
<siteMapNode title="Executive Administration" url="/team/ExecutiveAdministration/SitePages/Home.aspx" />
<siteMapNode title="Government Reporting" url="/team/govtreport/SitePages/Home.aspx" />
<siteMapNode title="Information Assurance" url="/team/InfoAssurance/SitePages/Home.aspx" />
<siteMapNode title="Journal Management" url="/team/JournalManagement/SitePages/Home.aspx" />
<siteMapNode title="Legal Process File" url="/team/LegalProcess/SitePages/Home.aspx"/>
<siteMapNode title="Marketing Intelligence" url="/team/marketing_intelligence/SitePages/Home.aspx"/>
<siteMapNode title="Network Operations" url="/team/NetOps/SitePages/Home.aspx" />
<siteMapNode title="Network Working Group" url="/team/NetworkWorkingGroup/SitePages/Home.aspx" />
<siteMapNode title="OnBoarding Form" url="/team/onboard/SitePages/Home.aspx" />
<siteMapNode title="Proposal Command Center" url="/team/Proposal/SitePages/Home.aspx"/>
<siteMapNode title="Santa Paula Teleport" url="/team/spa/SitePages/Home.aspx" />
<siteMapNode title="Sales Engineering" url="/team/sales_engineering/SitePages/Home.aspx"/>
<siteMapNode title="Southbury Teleport" url="/team/sby/SitePages/Home.aspx"/>
<siteMapNode title="Training Academy" url="/team/trainingacademy/SitePages/Home.aspx"/>
</siteMapNode>
<siteMapNode title="Projects" url="/SiteDirectory/Pages/Projects.aspx">
<siteMapNode title="TG Carve Out Project" url="/project/nwov2/SitePages/Home.aspx" />
</siteMapNode>
</siteMapNode>
</siteMap>If someone has a dev environment they case test this XML in, that would be great. I am stumped.
Monday, February 4, 2013 1:03 PM
Answers
-
I don't know why, but the answer seems to be that if you have the same URL listed twice anywhere, the map crashes. Also, if one part of a section has no URL and the others do, it crashes.
To fix it, I added a different URL to every section, which is how it is to be in production (I was just missing some URLs at the time).
Odd bug.
- Marked as answer by GeminiRand4 Wednesday, February 13, 2013 6:08 PM
Wednesday, February 13, 2013 6:08 PM
All replies
-
Hi GeminiRand4,
This is a known issue. Site Map control crashes when you point to a page in the URL (instead of Site) and that site is with broken permissions.
Fix is simple: Instead of : <siteMapNode title="EMEA" url="~/finance/EMEA/default.aspx">, use: ="~/finance/EMEA">
Regards,
Salaudeen Rajack
- Proposed as answer by Hemendra Agrawal Tuesday, February 12, 2013 6:13 AM
Tuesday, February 5, 2013 8:23 AM -
I don't know why, but the answer seems to be that if you have the same URL listed twice anywhere, the map crashes. Also, if one part of a section has no URL and the others do, it crashes.
To fix it, I added a different URL to every section, which is how it is to be in production (I was just missing some URLs at the time).
Odd bug.
- Marked as answer by GeminiRand4 Wednesday, February 13, 2013 6:08 PM
Wednesday, February 13, 2013 6:08 PM