Fixing the “The given key was not present in the dictionary” navigation error in a SharePoint 2016 farm
Tags: sharepoint2016, sharepoint, fix, navigation
Published: 2018-09-17 21:27:50

---
title: Fixing the “The given key was not present in the dictionary” navigation error in a SharePoint 2016 farm
published: true
tags: SharePoint 2016,SharePoint,Fix,Navigation
canonical_url: https://blogit.create.pt/miguelisidoro/2018/09/12/fixing-the-the-given-key-was-not-present-in-the-dictionary-navigation-error-in-a-sharepoint-2016-farm/
---
The post [Fixing the “The given key was not present in the dictionary” navigation error in a SharePoint 2016 farm](https://blogit.create.pt/miguelisidoro/2018/09/12/fixing-the-the-given-key-was-not-present-in-the-dictionary-navigation-error-in-a-sharepoint-2016-farm/) appeared first on [Blog IT](https://blogit.create.pt).

Hello,

Today, after migrating a SharePoint 2010 farm to SharePoint 2016, I suddenly caught an error with the current navigation in a SharePoint Publishing site. The site collection contains three main sub sites. For two of them, SharePoint navigation worked perfectly fine but for the other one, the navigation was not being shown.

# The Problem

To try to find out the problem in the problematic sub site, I navigated to the Navigation settings page and caught the following error:

_ **The given key was not present in the dictionary.** Stack Trace: at System.ThrowHelper.ThrowKeyNotFoundException() at System.Collections.Generic.Dictionary`2.get_Item(TKey key) at Microsoft.SharePoint.Publishing.CachedArea.CreateResultSetFromSuperUserAndSuperReader(StringCollection superReaderItemIDs, StringCollection superUserItemIDs, Dictionary`2 cachedObjects, SPWeb contextWeb, SPQuery query, List`1 fieldrefs, ICachedObjectFactory objectFactory) at Microsoft.SharePoint.Publishing.CachedArea.GetChildForListByQuery(String listName, SPQuery query, SPWeb contextWeb, Boolean onlyPopulateCache, List`1& itemsFetched, Boolean skipIfThrottled) at Microsoft.SharePoint.Publishing.Navigation.PortalWebSiteMapNode.FetchDynamicItems(PublishingWeb pubWeb, NodeTypes includedTypes, Boolean& websFetched, Boolean& pagesFetched) at Microsoft.SharePoint.Publishing.Navigation.PortalWebSiteMapNode.PopulateNavigationChildrenInner(NodeTypes includedTypes) at Microsoft.SharePoint.Publishing.Navigation.PortalWebSiteMapNode.PopulateNavigationChildren(NodeTypes includedTypes) at Microsoft.SharePoint.Publishing.Navigation.PortalSiteMapNode.GetNavigationChildren(NodeTypes includedTypes, NodeTypes includedHiddenTypes, Boolean trimmingEnabled, OrderingMethod ordering, AutomaticSortingMethod method, Boolean ascending, Int32 lcid) 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)_

# The Solution

To solve the problem, all I had to do was reactivating the “SharePoint Server Publishing”  Site Feature (not the corresponding Site Collection feature) on the problematic sub site:

![](https://i2.wp.com/blogit.create.pt/wp-content/uploads/2018/09/PublishingSiteFeature.jpg?resize=696%2C52&ssl=1)

After reactivating the feature, the navigation started to work as expected.

**NOTE:** This solution should also be applicable to other versions of SharePoint Server, including SharePoint 2019. To learn more about all the upcoming features in SharePoint 2019, click [here](https://blogit.create.pt/miguelisidoro/2018/08/04/sharepoint-server-gets-modern-sharepoint-2019-is-here/).

Hope this helps someone!

If you want to learn more about installing a SharePoint 2016 farm in a completely automated way using a PowerShell solution called AutoSPInstaller, click [here](https://blogit.create.pt/miguelisidoro/2018/07/28/how-to-install-a-sharepoint-2016-farm-using-powershell-and-autospinstaller-part-1/) and [here](https://blogit.create.pt/miguelisidoro/2018/07/28/how-to-install-a-sharepoint-2016-farm-using-powershell-and-autospinstaller-part-2/).

Happy SharePointing!

The post [Fixing the “The given key was not present in the dictionary” navigation error in a SharePoint 2016 farm](https://blogit.create.pt/miguelisidoro/2018/09/12/fixing-the-the-given-key-was-not-present-in-the-dictionary-navigation-error-in-a-sharepoint-2016-farm/) appeared first on [Blog IT](https://blogit.create.pt).