0
votes

I'm upgrading our SharePoint 2007 install to SharePoint 2010. One of the problems I'm running into is a NullReferenceException when I go to Site Actions -> Site Settings -> Navigation. I'm not sure where or how to start debugging this issue. Anyone have any ideas?

The error message and stack trace I'm getting are:

[NullReferenceException]: Object reference not set to an instance of an object.
  at Microsoft.SharePoint.Publishing.Navigation.PortalWebSiteMapNode.FetchDynamicItems(PublishingWeb pubWeb, NodeTypes includedTypes, Boolean& websFetched, Boolean& pagesFetched)
  at Microsoft.SharePoint.Publishing.Navigation.PortalWebSiteMapNode.PopulateNavigationChildrenInner(NodeTypes includedTypes)
  at Microsoft.SharePoint.Publishing.Navigation.PortalWebSiteMapNode.PopulateNavigationChildren(NodeTypes includedTypes)
  at Microsoft.SharePoint.Publishing.Navigation.PortalSiteMapNode.GetNavigationChildren(NodeTypes includedTypes, NodeTypes includedHiddenTypes, Boolean trimmingEnabled, OrderingMethod ordering, AutomaticSortingMethod method, Boolean ascending, Int32 lcid)
  at Microsoft.SharePoint.Publishing.Internal.CodeBehind.AreaNavigationSettingsPage.AddChildrenToControl(String parentId, PortalSiteMapNode node, Int32 depth, Int32 maxDepth)
  at Microsoft.SharePoint.Publishing.Internal.CodeBehind.AreaNavigationSettingsPage.InitializeNavigationEditSort()
  at Microsoft.SharePoint.Publishing.Internal.CodeBehind.AreaNavigationSettingsPage.OnLoad(EventArgs e)
  at System.Web.UI.Control.LoadRecursive()
  at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
[HttpUnhandledException]: Exception of type 'System.Web.HttpUnhandledException' was thrown.
  at System.Web.UI.Page.HandleError(Exception e)
  at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
  at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
  at System.Web.UI.Page.ProcessRequest()
  at System.Web.UI.Page.ProcessRequest(HttpContext context)
  at ASP._layouts_areanavigationsettings_aspx.ProcessRequest(HttpContext context)
  at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
  at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
3

3 Answers

0
votes

This is happening because you have nodes present in the database but the actual SPSite or SPWeb is not present in the content database. This indicates that one or more site was not completely migrated.

To debug this, write a custom utility, which will iterate over navigation nodes and try to instantiate it as SPWeb object. The failure will indicate the offender.

0
votes

Are you using a language pack? The problem could be the Pages list is created using a other language.

Take a look at:

http://social.technet.microsoft.com/Forums/sr-Latn-CS/sharepoint2010setup/thread/3e57584c-bebc-4326-9715-91ec9fd66d8d

0
votes

I had to change "Pages" to "Web Pages" in the Resources\osrvcore.en-US file in the 14 hive:

<Data Name="List_Pages_UrlName"> 
    <Value>WebPages</Value>  //Change from "Pages"
</Data>

Once I did that, the error disappeared.