SharePoint 2010 Nonstop Navigation Disappears When I Dispose AppPool and / or Clear the Object Cache

I have a tertiary level navigation problem on a SharePoint 2010 publishing website. I can reproduce the disappearance by disposing of the application pool or clearing the object cache. This seems to be a caching issue, as navigation providers use caching to improve performance. When the menu disappears, I can return it by simply going to the navigation settings for SPWeb and changing the order of the nodes. This is similar to cache invalidation and the menu reappears.

The following is a snippet of the portalsitemapdatasource and aspmenu files.

<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 is not very useful, so any help is provided very highly.

Edit: I just noticed that I donโ€™t need to change the order of nodes for menu items to appear again, just loading the _layouts / AreaNavigationSettings.aspx page for the SPWeb object does the trick. This is even more like a cache problem.

+6
source share
2 answers

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 indicated in the line where the navigation provider is declared, for example

 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 defines the maximum โ€œdynamicโ€ children for each website (dynamic children include children and pages). This default value is 50, so if the number of sub-sites and pages for a particular website exceeds 50 objects, it will be excluded if you do not configure this setting. This limit can be increased, but keep in mind the convenience of navigating a hierarchy that has so many children on each axis.

+2
source

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

-1
source

Source: https://habr.com/ru/post/890192/


All Articles