pnp / PnP-Sites-Core

Microsoft 365 Dev PnP Core component (.NET) targeted for increasing developer productivity with CSOM based solutions.
Other
415 stars 644 forks source link

Navigation items to non existing sites cause template failures #985

Open Pieter-Veenstra opened 7 years ago

Pieter-Veenstra commented 7 years ago

Category

[ X ] Bug [ ] Enhancement

Environment

[ X ] Office 365 / SharePoint Online [ ] SharePoint 2016 [ ] SharePoint 2013

If SharePoint on-premises, what's exact CU version:

Expected or Desired Behavior

My soot site template includes the following:

< pnp:NavigationNode Title="Clients" Url="{site}/clients" />

When Applying the template to a new root site the Apply-PnPProvisioningTemplate should report a warning but not fail.

Observed Behavior

Apply-PnPProvisioningTemplate : Cannot open "/clients": no such file or folder. At line:1 char:1

Steps to Reproduce

Apply template with the above node included while the clients site doesn't exist.

jansenbe commented 7 years ago

It's weird the API is throwing this error...requires further testing and investigation.

jansenbe commented 7 years ago

We managed to reproduce this internally, flagging as bug.

internal testing comments: Followed the steps as mentioned by the user Got below when provisioned. Cannot open "/sites/PnP_985P_Target/Clients": no such file or folder.

Note: In UI, if we add non-existing site Url then link is adding to navigation without any error.

andikrueger commented 6 years ago

Hi @jansenbe, is there any update on this topic? We are facing this issue in a SharePoint 2013 environment. We try to add a link to a friendly url and are receiving an error.

SvenWensing commented 6 years ago

Hello @jansenbe , we got the same Issue with a Sharepoint Online Site. We are working around it right now. Is the Issue beeing resolved in the next future ?

agamadrid commented 6 years ago

Hi,

I'm having the same issue, if the subiste does not exists this throws an error. "no such file or folder." pnp:NavigationNode Url = {SiteCollection}/subsite

Has this been fixed? Thanks

PaoloPia commented 6 years ago

This PR #1790 has just been merged.