Open simoncrelling opened 5 years ago
Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.
Hi , we are having the same behaviour. Even on GUI on the page , so it seems something internal . [UPDATE] I've try also with CSOM and the result is "Exception calling "ExecuteQuery" with "0" argument(s): "The remote server returned an error: (403) Forbidden." although im a Global Admin
I'm not seeing the issue via GUI so this could be an additional problem with your site. SharePoint does have a status incident today (for us at least). I've just tried adding a node on the root site collection via the GUI on my dev tenant and it worked, still not working via PowerShell.
Howdy again, the issue happens on a child node whenever u add a url. The root node u add it was a header or a url?
It was a url. For me the problem concerns nodes that have urls that contain /sites/ (when ran on the root site collection). The site is also a Hub site if that matters.
E.G.:
Connect-PnPOnline -Url "https://<myTenant>.sharepoint.com" -UseWebLogin
Add-PnPNavigationNode -Title "This One Fails" -Url "https://<myTenant>.sharepoint.com/sites/fail" -Location TopNavigationBar
Add-PnPNavigationNode -Title "This One Works" -Url "https://<myTenant>.sharepoint.com/sitepages/this-one-works.aspx" -Location TopNavigationBar
Add-PnPNavigationNode -Title "Headers Also Work" -Url "http://linkless.header/" -Location TopNavigationBar
Can you try after setting External
flag ?
Add-PnPNavigationNode -Title "This One Fails" -Url "https://<myTenant>.sharepoint.com/sites/fail" -Location TopNavigationBar -External
Adding the -External flag worked, thanks @gautamdsheth I wonder why this is required here but not on a hub site in the /sites/ path?
Adding the -External flag worked, thanks @gautamdsheth and thanks @simoncrelling
Notice: many issues / bugs reported are actually related to the PnP Core Library which is used behind the scenes. Consider carefully where to report an issue:
Apply-SPOProvisioningTemplate
orGet-SPOProvisioningTemplate
? The issue is most likely related to the Provisioning Engine. The Provisioning engine is not located in the PowerShell repo. Please report the issue here: https://github.com/officedev/PnP-Sites-Core/issues.Reporting an Issue or Missing Feature
Please confirm what it is that your reporting Using version 3.12.1908.1 When trying to add navigation nodes to a communication site in the tenant root, the command fails with:
Add-PnPNavigationNode : Cannot open "/sites/<sitename>": no such file or folder.
Expected behavior
Please describe what output you expect to see from PnP-PowerShell Cmdlets The node is added to the menu.
Actual behavior
Please describe what you see instead. Please provide samples of HTML output or screenshots The node is not added to the menu and an error occurs.
Steps to reproduce behavior
Please include complete code samples in-line or linked from gists I've created another communication site in the /sites/ location, registered it as a hub site and ran the same code, the node is added to the menu. If I do this in the root site collection it fails. The root site collection has been swapped to a modern communication site via Invoke-SPOSiteSwap.
Which version of the PnP-PowerShell Cmdlets are you using?
What is the version of the Cmdlet module you are running?
(you can retrieve this by executing
Get-Module -Name *pnppowershell* -ListAvailable
)How did you install the PnP-PowerShell Cmdlets?