Upgrading MOSS2007 to SharePoint 2010 results in navigation error

Having issues with navigation after an upgrade from MOSS2007 to SharePoint 2010 using the publishing template? We did! After an upgrade the navigation returned errors instead of menu items. We encountered these issues when the Dutch language pack was installed, because the Pages library has been translated/renamed to “Paginas”.

SharePoint Upgrade navigation errors Dutch Language Pack

Microsoft has provided a solution described in KB 2484317. The root cause of the issue is described as:

With Microsoft Office SharePoint Server 2007 we stored new Publishing Pages in a library called Pages. In SharePoint 2010 it has been translated to Paginas as the default for Dutch. The navigation code assumes that any changes from the default are noted in a specific property, which is not the case for upgraded Dutch sites that have been created with the 2007 default name.

The solution to this problem is pretty easy, a simple PowerShell script will restore your navigation.

$site = Get-SPSite("http://WebApplicationURL") foreach ($web in $site.AllWebs) { Write-Output("web:" + $web.ServerRelativeUrl); $pageslistid = $web.AllProperties["__PagesListId"] if ([String]::IsNullOrEmpty($pageslistid)) { Write-Output($web.ServerRelativeUrl +" doesn't have a pages list id set - skipping"); } else { $pageslistguid = new-object System.Guid($pageslistid) $pageslist = $web.Lists[$pageslistguid] $pagesurl = $pageslist.RootFolder.Url $pb = $web.Properties; $pb.Add("__PagesListName", $pagesurl); $pb.Update(); Write-Output($web.ServerRelativeUrl +" set pages list to " + $pagesurl); } }

Advertisements
Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: