6
votes

I've got an issue where the tertiary level navigation randomly disappears on a publishing SharePoint 2010 site. I can reproduce the disappearance by recycling the app pool or flushing the object cache. It seems like it is a caching issue as the navigation providers do use caching for performance. Once the menu disappears, I can get it back by simply going to the navigation settings for the SPWeb and changing the order of the nodes. This seems to invalidate the cache and the menu appears again.

Below is a snippet of the portalsitemapdatasource and aspmenu elements.

    <publishingnavigation:portalsitemapdatasource id="mapThirdLevelNavigation" runat="server"
        sitemapprovider="CurrentNavigation" enableviewstate="false" startfromcurrentnode="true"
        startingnodeoffset="1" showstartingnode="false" TreatStartingNodeAsCurrent="False" />

    <sharepoint:aspmenu id="mnuBottomNavigation" runat="server" datasourceid="mapTopNavigation"
        enableviewstate="false" accesskey="<%$Resources:wss,navigation_accesskey%>"
        orientation="Horizontal" maximumdynamicdisplaylevels="0" dynamichorizontaloffset="0"
        staticpopoutimagetextformatstring="" skiplinktext="" staticsubmenuindent="0"
        cssclass="bottom-topNavContainer" />

Google hasn't been very helpful so any assistance provided is very much appreciated.

Edit: Just noticed that I didn't need to change the order of the nodes for the menu items to reappear, just loading the _layouts/AreaNavigationSettings.aspx page for the SPWeb object does the trick. It's looking even more like a cache issue.

2

2 Answers

2
votes

Try increasing the value of DynamicChildLimit in web.config.

http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.publishing.navigation.portalsitemapprovider.dynamicchildlimit.aspx

This will be mentioned in a line where Navigation Provider is declared such as

add name="CurrentNavSiteMapProvider" description="CMS provider for Current navigation"
    type="Microsoft.SharePoint.Publishing.Navigation.PortalSiteMapProvider"
    NavigationType="Current" EncodeOutput="true" />

DynamicChildLimit, which is an integer property that specifies the maximum "dynamic" children for each Web site (dynamic children include subsites and pages). This value defaults to 50 so if the number of subsites and pages for a particular Web site is greater than 50 objects will be left out unless you adjust this setting. This limit can be increased but keep in mind the usability of a navigation hierarchy that has so many children at each pivot.

-1
votes

I resolved a similar problem: in PortalSiteMapDataSource control I changed the SiteMapProvider attribute from CurrentNavigation to CurrentNavSiteMapProvider.