Forum Discussion
PNP provisioning -Updating a list removes it from navigation
Hi Paul Matthews,
Are you doing something like this:
PS U:\> Get-PnPProvisioningTemplate -Handlers Lists -Out u:\testlists.xml PS U:\> PS U:\> Apply-PnPProvisioningTemplate -Path u:\testlists.xml
My navigation remains in tact. Can you share your template?
- Paul MatthewsNov 09, 2017Brass Contributor
Hi Pieter,
Thank you for replying. I've tried to break my code down further with an example to be able to share with you, and as you have found the left hand navigation remains.
Leave it with me, and I'll get you an example that does what I'm experience, or I will work out and understand why it's happening and post my findings to help someone else.
Thanks.Paul
- Paul MatthewsNov 10, 2017Brass Contributor
I have been able to replicate our problem. I provide you with 3 files.
https://1drv.ms/f/s!Am14qASzr6DTlaAgh-EwohiO2whrZw
From a brand new site collection using the classic Team site.
Apply-PnPProvisioningTemplate -Path:'./otbsite.xml' -Verbose
This will create a new list called 'Show on Nav', and included on the left hand navigation. I have also changed the homepage to be a modern page. (Welcome.aspx).
After you have done this run
Apply-PnPProvisioningTemplate -Path:'./otbsite.1.xml' -Verbose
This then updates the 'Show on Nav' views to include the version column. After this is run, the left hand navigation no longer shows 'Show on Nav'.
It looks like it's to do with the view Url, as we are using this template on multiple tenants, multiple site collections, we removed the original Url as '/sites/PNPTemplate/Show on Nav/Forms/AllItems.aspx' to '{site}/Show on Nav/Forms/AllItems.aspx'
However, after running the template otbsite.1.xml again and replacing the URL of the view from {site}/Show on Nav/Forms/AllItems.aspx' with '/site/blah/Show on Nav/Forms/AllItems.aspx' it doesn't remove from the left navigation, and the views still seem to work OK.
Still having an issue with Lists though.
Even though I have worked out the problem, do you think this is an error in PNP or SharePoint itself?
- Nov 10, 2017
Hi Paul Matthews,
I ran both xml templates and my show on nav list is still in the left hand navigation.