none
SharePoint 2013 Navigation Corrupted RRS feed

  • Question

  • Came in today and the top navigation in our Test environment had changed. We determined that nobody had done anything and decided to just chalk it up to the SharePoint gremlins and rebuild it. Now we are not able to do ANYTHING in the top level navigation settings page. Any click of OK responds with the following error and no changes are saved:

    Item has already been added. Key in dictionary: '__No?[?皷??!??J??#????@????Xe6??)-??靈?;????'  Key being added: '__No?[?皷??!??J??#????@????Xe6??)-??靈?;????'

    The same error  is printed when I try to make an update with PowerShell.

    Is there a way to revert the navigation provider to a clean version?  We can rebuild it but right now can not make any changes at all.  There are no customizations in the nav... everything was done through the settings page (hiding/adding links, Show Subsites, Show Pages, etc)


    • Edited by B J B Friday, February 17, 2017 2:35 PM added error
    Thursday, February 16, 2017 5:41 PM

Answers

  • Hi,

    We can reset the navigation to default one using PowerShell command:

    $SPSite = Get-SPSite -Identity "http://siteurl/"
    
    #Go through each site in the Site Collection
    foreach ($SPWeb in $SPSite.AllWebs)
    {
        $navSettings = New-Object Microsoft.SharePoint.Publishing.Navigation.WebNavigationSettings($SPWeb)
        $navSettings.ResetToDefaults();
        $navSettings.GlobalNavigation.Source = 1
        $navSettings.Update()
    
        Write-Host "Navigation updated successfully for site $url"
    
    }

    More information:

    Reset sharepoint site navigation through powershell

    Thanks

    Best Regard


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    • Marked as answer by B J B Thursday, February 23, 2017 4:21 PM
    Friday, February 17, 2017 8:07 AM
  • I ended up resolving this by copying the hash in the metainfo field in AllWebs from my dev environment into this one. This was the ONLY way I was able to remove those corrupted keys. After the 1:1 copy from dev (I cleared the properties on Dev first so it only had basic ones) the issue was resolved.

    declare @goodMetaInfo varbinary(max)

    SELECT

        @goodMetaInfo=  metainfo

     

      FROM [WSS_Content_Intranet_DEV].[dbo].[AllWebs]

    where id = 'c0b21c7d-37b5-4db6-a9b5-2334edc5b4d0'

    print @goodMetaInfo

    update   [WSS_Content_Intranet_QA].[dbo].[AllWebs]

    set metainfo = @goodMetaInfo

    where id = 'c0b21c7d-37b5-4db6-a9b5-2334edc5b4d0'


    • Edited by B J B Tuesday, February 21, 2017 1:54 PM
    • Marked as answer by B J B Thursday, February 23, 2017 4:21 PM
    Tuesday, February 21, 2017 1:53 PM

All replies

  • Hi,

    We can reset the navigation to default one using PowerShell command:

    $SPSite = Get-SPSite -Identity "http://siteurl/"
    
    #Go through each site in the Site Collection
    foreach ($SPWeb in $SPSite.AllWebs)
    {
        $navSettings = New-Object Microsoft.SharePoint.Publishing.Navigation.WebNavigationSettings($SPWeb)
        $navSettings.ResetToDefaults();
        $navSettings.GlobalNavigation.Source = 1
        $navSettings.Update()
    
        Write-Host "Navigation updated successfully for site $url"
    
    }

    More information:

    Reset sharepoint site navigation through powershell

    Thanks

    Best Regard


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    • Marked as answer by B J B Thursday, February 23, 2017 4:21 PM
    Friday, February 17, 2017 8:07 AM
  • Unfortunately this led me to the actual issue which is that the property named above in the screenshot is in the AllProperties of the root SPWeb. The problem now is when I try to remove it I get the same error that it is there already. I am going to do a bit more digging in the content db. PowerShell errors any time I try to update the root SPWeb.
    Friday, February 17, 2017 2:34 PM
  • Hi,

    Please check the ULS log for more detailed information, by default, SharePoint 2013 ULS log is located at the path:

    C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\LOGS

    Thanks

    Best Regards


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Monday, February 20, 2017 6:31 AM
  • I ended up resolving this by copying the hash in the metainfo field in AllWebs from my dev environment into this one. This was the ONLY way I was able to remove those corrupted keys. After the 1:1 copy from dev (I cleared the properties on Dev first so it only had basic ones) the issue was resolved.

    declare @goodMetaInfo varbinary(max)

    SELECT

        @goodMetaInfo=  metainfo

     

      FROM [WSS_Content_Intranet_DEV].[dbo].[AllWebs]

    where id = 'c0b21c7d-37b5-4db6-a9b5-2334edc5b4d0'

    print @goodMetaInfo

    update   [WSS_Content_Intranet_QA].[dbo].[AllWebs]

    set metainfo = @goodMetaInfo

    where id = 'c0b21c7d-37b5-4db6-a9b5-2334edc5b4d0'


    • Edited by B J B Tuesday, February 21, 2017 1:54 PM
    • Marked as answer by B J B Thursday, February 23, 2017 4:21 PM
    Tuesday, February 21, 2017 1:53 PM
  • Hi,

    Thanks for your sharing and I suggest you can mark it as answer so that it can help others who stuck with the same issue in the forum.

    Best Regards


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Wednesday, February 22, 2017 2:49 AM