简体   繁体   中英

Sharepoint 2013 - unable to hide a subsite from navigation

I am unable to hide/show pages & subsites from the navigation in SharePoint Server 2013 (15.0.4841.1000 July 2016 CU).

I have SharePoint Server Publishing Infrastructure enabled at the site collection level and SharePoint Server Publishing enabled at the site level.

I want to change the navigation for a site, this is what I do:

  1. I click on the gear -> Site Settings
  2. Under Look and Feel, I click on Navigation
  3. I verify that under Global Navigation, "Show subsites" and "Show pages" are already checked - no need to change this
  4. I verify that under Current Navigation, "Show subsites" and "Show pages" are already checked - no need to change this
  5. I scroll down to "Structural Navigation: Editing and Sorting" I click on a subsite, and then click on the "Hide" button, the selected subsite now has the word "(hidden)" beside it
  6. I click on the "OK" button at the bottom right
  7. I check to see if my subsite is still showing up in the navigation - it is.
  8. I go back into the navigation settings, my subsite does not have the word "(hidden)" beside it.

Noodling around I have found:

  • I cannot Hide any pages or subsites.
  • I cannot Show any pages or subsites that are already hidden.
  • I can add new links and headings
  • I can edit links and headings
  • I can delete links and headings
  • I can reorder the navigation - this includes links, headings, subsites & pages

So, it looks like on the navigation settings page it will apply any changes except Hide/Show changes. I know that as a hack I could uncheck "Show subsites" and add in all of the links manually, but I would rather have SharePoint take care of the navigation automatically. But I still want the ability to tweak that navigation. Has anyone else run into this? Any ideas on how to fix this?

Thanks!

We have been suffering from this bug also, we have June 2016 CU installed. Finally found some comment from Microsoft. Stefan Goßner commented "The navigation issue was introduced with June CU – a fix is currently planned to be released for October CU." on comments section on page https://blogs.technet.microsoft.com/stefan_gossner/2016/08/09/august-2016-cu-for-sharepoint-2013-product-family-is-available-for-download/

UPDATE : October CU is available and this navigation bug has been fixed: https://blogs.technet.microsoft.com/stefan_gossner/2016/10/11/october-2016-cu-for-sharepoint-2013-product-family-is-available-for-download/

I have installed October 2016 CU on couple of farms and it fixed navigation show/hide bug at least on our environments.

So I found another person with a similar problem here: https://social.technet.microsoft.com/Forums/en-US/b2bac40d-ed31-4ec5-842b-260275ae5e6c/unable-to-hide-one-subsite-in-global-navigation-menu?forum=sharepointadmin

I was able to fix my navigation with powershell:

Add-PSSnapin Microsoft.SharePoint.PowerShell –erroraction SilentlyContinue

$web = Get-SPWeb http://SubSiteUrl... 
$publishingWeb = [Microsoft.SharePoint.Publishing.PublishingWeb]::GetPublishingWeb($web) 

$pageTitlesToShow = @("Test Page 1","Test Page 2")  

$pages = $web.Lists["pages"]  
foreach ($item in $pages.Items) {
    if (-not $pageTitlesToShow.Contains($item.Title)){
        $item.Title
        $item.UniqueId
        $publishingWeb.Navigation.ExcludeFromNavigation($false,$item.UniqueId);
    } }

$publishingWeb.Update()  
$web.Close()  
$web.Dispose()

However, users still cannot update the navigation through the GUI. Is there anyone else out there having problems with the navigation? Site Owners should be able to manage this on their own.

Figured it out. Hope this helps someone out there.

This script shows (un-hides) a single page

$web = Get-SPWeb http://subsiteURL
$publishingWeb = [Microsoft.SharePoint.Publishing.PublishingWeb]::GetPublishingWeb($web)
$pageTitlesToShow = @("Page Title") # this needs to be page title
$pages = $web.Lists["pages"]
foreach ($item in $pages.Items)
{
    if ($pageTitlesToShow.Contains($item.Title)){
        $item.Title
        $item.UniqueId
        $publishingWeb.Navigation.IncludeInNavigation($false,$item.UniqueId);        
    }
}

$publishingWeb.Update()
$web.Close()
$web.Dispose() 

Go into navigation and hide the original navigation link. Insert a new link, this will not show the subsites under subsites.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM