Thursday, October 11, 2007

Broken navigation in team portal when deleting security or requirements document library

Lately I've been mucking about with the portal parts of Team System since we wanted to move our documents into SharePoint and gain all the benefits there.

We did however bump into a major issue that turned out to be a bug in the SharePoint templates in Team System. The bug is fixed in the upcomming release (TFS2008) in both template versions (WSS2.0 & WSS3.0).

The problem occurs when you delete certain document libraries from you portals, namely the security and requirements. This will corrupt the portal navigation (quicklaunch) and once you've ended up in a corrupted state you can not get any document libraries to appear on the quick launch.

The bug is related to some sort of hardcoding in the template concerning the security and requirements document libraries. You can test this by enabling "show on quicklaunch" in these document librareis. This will generate duplicates on the quicklaunch. And if you remove either of them the navigation breaks.

After some discussions with Microsoft support we came to the conclusion that if you delete the security or requirements document libraries (either through team explorer or through the portal), it seems that an orphaned element is left in the dbo.navnodes table of your SharePoint content database.

There is a way to remove these document libraries with out breaking the navigation. To do this you need to use FrontPage 2003 and connect to the site in question. Then open the file default.aspx and you will see the following section on the left.

Double click on either the security or requirements link and you will be presented with the "linkbar properties" dialogue. Then remove the link to the security and/or requirements document library from the quicklaunch.

When you have done this it's ok to remove the document libraries from any tool you choose.

If you like me have a trigger happy finger and don't like unused stuff and already have deleted the document libraries and are stuck with a broken portal there is a solution :).

NOTE THAT THIS IS NOT A SOLUTION SUPPORTED BY MICROSOFT!!! So you should know what you are doing when performing this recovery strategy and always make sure that you have a made a complete backup of both sharepoint databases before starting this procedure!!!

Step 1, Get the identity of the orphaned document library from the navigation nodes table.

SELECT DocId FROM dbo.navnodes
WHERE name = 'BrokenDocumentLibraryName' AND
SiteId IN (SELECT SiteId FROM dbo.Webs WHERE FullUrl = 'sites/TeamProjectName') AND
WebId IN (SELECT id FROM dbo.Webs WHERE FullUrl = 'sites/TeamProjectName')

Step 2, Verify that the document library actually is orphaned.

WHERE Id = 'DocumentLibraryIdentity'

Step 3, Remove the orphaned document library from the navigation node table.

DELETE FROM dbo.navnodes
WHERE DocID = 'DocumentLibraryIdentity'


  1. Thank you. Apparently we were not the first to break this. Of course, the real question is how to prevent site admins from breaking it ...

  2. I have some Quicklaunch headers that have somehow become corrupted. The URL is very long with repeating query parameters over and over. I can't edit or delete them with the Navigation settings page. their URLs are now some very long string. As a test, on a test site, I tried modifying the Name and the url of navnode for one of them.. but it has no impact. Yet I know that page does change that table. I've looked for matching entries in the Docs table and don't see anything.

    If anybody know what might be going on. Please respond to

  3. The only way I can think of the check if it is a problem is to find the corrupted links in the database, they should be in the navnodes table. I hope it works out for you.