We have recently deployed another new branded look and feel to our SharePoint 2010 intranet. It comes with heavy customization and of course a custom master page. Everything works fine until we hit the web analytics report under site settings – the famous SharePoint unexpected error.
We went to the ULS log and found the following error:
System.ArgumentException: Could not find the sitemap node with URL '/_layouts/WebAnalytics/WebAppSelection.aspx'.
This seems strange to me as we used to have an old customized master page and it didn’t have the same problem. It’s quite a common problem after some Google, but none of the mentioned solutions (http://social.technet.microsoft.com/Forums/en/sharepoint2010setup/thread/2022cff0-e2cf-4702-bb2a-17dc91dd4247) really works for us.
Just a quick run down of our custom master page: we have 3 heavy customized navigation control: Global navigation, side navigation, as well as a footer (doormat) navigation.
I start to remove these navigation one by one from the master page – and eventually I found that the footer navigation is the one that is causing the problem. And what’s more, it is the SiteMapDataSource object that is causing the problem. This is strange, because the global navigation and the side navigation is using the same site map provider.
After bit of playing around, I found the solution – by moving the footer data source control before the QuickLaunchDataSource delegate control (or the side side navigation). I don’t have any explanation, but it looks like you cannot declare any SiteMapDataSource after the Quick Launch (or Side Nav) data source.