Monday, March 15, 2010

[MOSS] Unknown Error when opening AreaNavigationSettings.aspx

Last week one of my colleagues contacted me about an issue he encountered. When trying to open the navigation settings page (/_layouts/AreaNavigationSettings.aspx), he encountered an "Unknown Error" (don't you just love those nice and clear errors). When opening the default page, the Quick Launch navigation on that page was also displaying errors:

When using the CustomErrors=Off and StackTrace=True options in the web.config, we were able to retrieve a "Object reference not set to an instance of an object" message. In the ULS logs, we found the following errors:
    • Unable to retrieve the CachedObject that this ProxySiteMapNode references: /sites/test/sites/183/Pages/testpage.aspx
    • PortalSiteMapProvider was unable to fetch children for node at URL: , message: Object reference not set to an instance of an object

The quick launch navigation was changed manually and navigation items were added. Looking a little further, I found that testpage.aspx didn't exist anymore in the Pages library. Probably a user had deleted this page, causing this issue. When I recreated the testpage.aspx, the Quick Launch navigation started working again and the Navigation Settings page didn't show the error anymore.


Matthew S. Mulherin, SharePoint MCTS said...

any idea what caused this? experience tells me that SharePoint should have deleted the navigation links when the user deleted the web page.

Yorick said...

Correct, however SharePoint only does this when the link is generated automatically. When you create a navigation link manually, you need to administer this link manual as well.