Thursday, 12 November 2009

Corrupt Global Navigation in SharePoint

I came across a problem with the global navigation in a MOSS site collection where the top navigation bar only showed a link to its own site and another one showing the word “Error”.

ErrorWhen you hovered over the link, it displayed the message “An error occured while rendering navigation for requested URL” with a “The system cannot find the file specified (Exception from HRESULT: 0x80070003)” exception message. When I tried to change the navigation using the normal site settings option, it gave me a “File Not Found” message with a pretty large and undecipherable stack trace.

I tried deactivating the publishing features at both the site and site collection level, which returned the normal WSS navigation bar back successfully, but when I reactivated the features, the problem came back again.

I thought I might have more success via the Object Model, so I developed a small Windows application that goes through all the navigation nodes and deletes them one by one. I ran this application pointing at the relevant site collection and although it reported a “Cannot complete this action. Please try again” message, it did enough to get rid of the Error message in the navigation bar and allow me to go back into the navigation settings using the browser and delete the remaining nodes.

ResetMOSSNav

I have uploaded the application to my SkyDrive, in case it helps anyone else out there: Download

7 comments:

  1. I'm Global nav issue in SP 2010. When I click on any item in Global Nav in Navigation settings, it gives me an error that I should "Stop running the script". It seems like your program would be useful to reset navigation to possibly correct this problem. Do you have an updated version of your program or is there another way to reset navigation?

    ReplyDelete