Applying template with ClientSidePages in template definition fails
See original GitHub issueCategory
- Bug
Describe the bug
Using the PnP.Powershell preview module, I try to apply a template with the new Invoke-PnPSiteTemplate
command.
Provisionning is done but fails at the end with ClientSidePages (I actually have only one quite simple Home page definition) and raises a NullReferenceException.
If I comment the ClientSidePages in my xml file, no error.
If I use the (soon-to-be) legacy Apply-PnPProvisionningTemplate
command, template is applied without error.
Steps to reproduce
Use Invoke-PnPSiteTemplate
to apply a template with ClientSidePages node.
Expected behavior
Template applied without errors.
Environment details (development & target environment)
- OS Windows 10
- Additional details : Using PnP.PowerShell 0.3.33-nightly
Additional context
Issue Analytics
- State:
- Created 3 years ago
- Comments:17 (9 by maintainers)
Top Results From Across the Web
Error when applying a custom template to a Sharepoint site
I am just testing the ability to create Sharepoint (Online) sites from templates as per this closed post.
Read more >Create a modern SharePoint site template with multiple pages ...
It starts by saving the site as a template with all properties and definitions included, then it loops through all the pages in...
Read more >Web/Site Templates in SharePoint Online Modern Pages? No ...
The main thing is ClientSidePages section where we could define Modern Pages customizations. As you could see I want to modify existing Home....
Read more >Split your PnP Provisioning schema into multiple files for ...
Let's say we have a provisioning template with a list definition. I want to move the list definition into a separate file, ...
Read more >client-side pages - PnP/PnPjs
This example shows how to handle a property set within the serverProcessedContent, in this case a List part's display title. import { spfi...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have tested the new PnP.PowerShell 1.2.0 and it’s now working like a charm. Thanks !
Hi @jansenbe, tried again this morning and NullReferenceException still happens. If comment the pnp:ClientSidePages node, provisionning ends without error.
I checked to update PnP.PowerShell to .34-nightly but the last version available is still .33-nightly : PSGallery
I’ll give another try as soon as .34 is available.