pnp / PnP-PowerShell

SharePoint PnP PowerShell CmdLets
https://pnp.github.io/powershell
Other
990 stars 663 forks source link

Navigation Errro in Apply-PnPProvisioningTemplate PS Cmd #1453

Open sivamsolai opened 6 years ago

sivamsolai commented 6 years ago

Reporting an Issue or Missing Feature

We receive an “no such file or folder” error, when handling Apply-PnPProvisioningTemplate PowerShell cmd.

Expected behavior

The wiki home page URL should add on navigation menu.

Actual behavior

Receive a " Cannot open "/sites/Target-02/Wiki/Home.aspx": no such file or folder." error when running the PS cmd “Apply-PnPProvisioningTemplate” @VesaJuvonen

Steps to reproduce behavior

create wiki page library on source site and add "Home.apx" url on navigation XML

Apply-PnPProvisioningTemplate - template.xml

Which version of the PnP-PowerShell Cmdlets are you using?

  • [ ] PnP PowerShell for SharePoint 2013
  • [ ] PnP PowerShell for SharePoint 2016
  • [x] PnP PowerShell for SharePoint Online

What is the version of the Cmdlet module you are running?

2.24.18

How did you install the PnP-PowerShell Cmdlets?

  • [x] MSI Installed downloaded from GitHub
  • [ ] Installed through the PowerShell Gallery with Install-Module
  • [ ] Other means
sivamsolai commented 6 years ago

@VesaJuvonen We experiencing the issue on FEB release . Could please help on this

erwinvanhunen commented 6 years ago

In order to look into this one, it helps if you can share the actual template. Thanks :-)

sivamsolai commented 6 years ago

PNP-March-Team.zip @erwinvanhunen

attached template which having issue

erwinvanhunen commented 6 years ago

Thank you.

You are referencing the Home.aspx file in the wiki in your navigation. Because you did not specify the IsExternal="true" attribute on that node, SharePoint will actually check if the URL is valid and points to an existing file. If the file is not present you will receive that error message. I checked your template, and you are not provisioning the home.aspx file, which means that it either has to be present already, provisioned through some other means, for the navigation node to work as you specified it. Alternatively, if you intend to create the file at later stage, you will have to specify the IsExternal="true" switch on the node in the template.

sivamsolai commented 6 years ago

@erwinvanhunen Thanks for your reply. I understand the problem have a one question.

By default "Home.page", "How to use this wiki library.aspx" pages will be created while create wiki page library on site.the source site created wiki page library.

But provisioned site. these pages are not created on target site

Source Site image

Target Site image