Wednesday, April 20, 2011

Web Analytics Reports error with Custom Master Page

If you're using a custom master page and get an exception when trying to access the Web Analytics Reports that looks like this:
System.ArgumentException: Could not find the sitemap node with URL '/_layouts/WebAnalytics/WebAppSelection.aspx'. 
 The error is getting thrown from the PlaceHolderHorizontalNav, and if you clear it's contents inside you'll resolve the error:

              <asp:ContentPlaceHolder id="PlaceHolderHorizontalNav" runat="server">
                    <!-- Remove this to fix Web Analytics Report exception
                    <SharePoint:AspMenu
                          ID="TopNavigationMenuV4"
                          Runat="server"
                          EnableViewState="false"
                          DataSourceID="topSiteMap"
                          AccessKey="<%$Resources:wss,navigation_accesskey%>"
                          UseSimpleRendering="true"
                          UseSeparateCss="false"
                          Orientation="Horizontal"
                          StaticDisplayLevels="2"
                          MaximumDynamicDisplayLevels="1"
                          SkipLinkText=""
                          CssClass="s4-tn"/>
                        <SharePoint:DelegateControl runat="server" ControlId="TopNavigationDataSource" Id="topNavigationDelegate">
                            <Template_Controls>
                                <asp:SiteMapDataSource
                                  ShowStartingNode="False"
                                  SiteMapProvider="SPNavigationProvider"
                                  id="topSiteMap"
                                  runat="server"
                                  StartingNodeUrl="sid:1002"/>
                            </Template_Controls>
                        </SharePoint:DelegateControl>
                       -->
                </asp:ContentPlaceHolder><sharepoint:aspmenu >

No comments: