Tuesday 28 April 2015

BreadCrumb shows old path after moving sharepoint 2010 site to different location

Good Afternoon Friends!

Hope you all are doing good! :)


We moved one of the subsite recently to the upper level from "Site Settings >> Site content and structure". It successfully moved to the upper level in hierarchy. No problem. A piece of cake.

But when we checked the moved site from top level navigation, we observed that Breadcrumb was showing still the old path. Breadcrumb was the custom control but it was using nothing more than a SiteMap control and a SiteMapProvider "CurrentNavSiteMapProviderNoEncode".

With this issue, there was one more lined up. Current Site Navigation control (SharePointWebControls:AspMenu with PublishingNavigation:PortalSiteMapDataSource) on the page (having SiteMapProvider as "CurrentNavSiteMapProvider") was showing subsites based on previous parent site reference.

The issue seemed because of the SharePoint Object Cache which was not refreshed. SiteMapProviders are cached in the SharePoint object cache. One way to refresh the cache was to reset the app pool for that web application in IIS. But since this was the Production and a working day and not a showstopper issue, we didn't want to put Customer into trouble.

We checked the Current Navigation and Global Navigation items from "Site Settings >> Navigation" and surprisingly those items were shown correctly there. After observing those navigation items, we just clicked on the "Ok" button(without doing any changes) and then checked the breadcrumb and Site navigation controls again on the site's main page.

And we saw that both Issues were FIXED automatically :)

How this happened?

Well, this could be because by just clicking the "Ok" button in Navigation settings might have refreshed the SharePoint Object Cache completely (which caches "SiteMapProviders")

And hence the old cached references got refreshed for Site Map Providers and it showed new values correctly in Breadcrumb and Site Navigation control.

There is one good article from Paul to how to refresh object caches and breadcrumbs when any site is moved to some different location in SharePoint.

Hope it will help somebody out there.

Happy Learning! :)






1 comment:

  1. Thanky you for this information. Helped me a lot!

    Cheers Joerg

    ReplyDelete