My blog has moved!

Visit http://blog.adamroderick.com/ and update your bookmarks.

Wednesday, October 15, 2008

Error Tab in Navigation

None of my navigation was showing up in my SharePoint site. In fact, there was just a single tab with the text "Error" The tooltip in the HTML showed an exception with the follwoing text:


An error occured while rendering navigation for requested URL: /.
Exception message: Object reference not set to an instance of an object.
Stack trace:
at Microsoft.SharePoint.Publishing.Navigation.PortalSiteMapNode.GetNavigationChildren(NodeTypes includedTypes, NodeTypes includedHiddenTypes, OrderingMethod ordering, AutomaticSortingMethod method, Boolean ascending, Int32 lcid)
at Microsoft.SharePoint.Publishing.Navigation.PortalSiteMapNode.GetNavigationChildren(NodeTypes includedHiddenTypes)
at Microsoft.SharePoint.Publishing.Navigation.PortalSiteMapProvider.GetChildNodes(PortalSiteMapNode node, NodeTypes includedHiddenTypes)


I then ran the stsadm command: stsadm -o enumsites -url http://localhost:2221 but received an error.

The root of the errors was in my alternate access mappings. localhost is a web front end server, but the central admin runs on a different machine. I added my localhost (using the server name) as an internal URL that mapped to the URL of the machine running central admin. Problem solved.

Labels:

SharePoint: 404 error when trying to view a page layout

I created and provisioned a page layout in my elements.xml file. The problem was that the reference to the master page was incorrect. Instead of a friendly error, or a message indicating that the reference was incorrect, browsing to the page only returned a 404 error. After fixing the reference in SharePoint Designer, I was able to browse to the page layout aspx. I then made the change in the physical file in my VS solution.

Labels: