I was trying to modify the navigation in a portal I was developing and for some reason it could not be modified. And like any good developer I checked my logs and I found the following error:

“Unable to retrieve TopNavigationBar SPNavigationNodeCollection from Web at: http://server. The SPNavigation store is likely corrupt.”

image

I found out it was because NavBar element was missing in the onet.xml. Once I put this element in the onet.xml I deleted the site collection and created it again and I was able to edit the top navigation.

image