question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Applying template with ClientSidePages in template definition fails

See original GitHub issue

Category

  • 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:closed
  • Created 3 years ago
  • Comments:17 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
GreatTommycommented, Jan 22, 2021

I have tested the new PnP.PowerShell 1.2.0 and it’s now working like a charm. Thanks !

1reaction
adzerocommented, Jan 13, 2021

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found