pnp / pnp/pnpframework

Invoke-PnPSiteTemplate and Convert-PnPSiteTemplate failing on template

Open
#475 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
259
Forks
161
Avg merge
10h 33m
Merged PRs (30d)
1

Description

Invoke-PnPSiteTemplate and Convert-PnPSiteTemplate are failing on template.

I've first noticed this with Invoke-PnPSiteTemplate on several template that previously worked without any issues. Now the comand will acutally process the template, but is effectivly doing nothing.

I've recently tried to convert that template (still using an old schema 201805 or 201807) with Convert-PnPSiteTemplate. This here is all I get back from a full-featured template - the actual template part is stripped blank:

<pnp:Provisioning xmlns:pnp="http://schemas.dev.office.com/PnP/2021/03/ProvisioningSchema">
  <pnp:Preferences Generator="PnP.Framework, Version=1.6.0.0, Culture=neutral, PublicKeyToken=null" />
  <pnp:Templates ID="CONTAINER-">
    <pnp:ProvisioningTemplate Version="0" Scope="Undefined" />
  </pnp:Templates>
</pnp:Provisioning>

I had to migrate the templates manually to a later schema to get them working again. I manged to get them to 202002 and was then able to convert them to LATEST as well as directly apply them using Invoke-PnPSiteTemplate.

It really seems a breaking thing with some schema versions for both commands. Not exactly sure at which version it's breaking and on which version it's fine again. All I can say is, that I have the issue with 201805 and 201807 and it's working again with 202002.

Only thing I've noticed converting one of the templates from 202002 to LATEST then was, that in a template actually containing more then one ProvisioninTemplate childs only one gets converted - the other one (in my case only 2) was dropped. Converting them one by one and merging the outcome was - of course - possible.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing Invoke-PnPSiteTemplate and Convert-PnPSiteTemplate with templates using schemas 201805 and 201807, then compare them with the working 202002 schema. Check conversion of templates containing multiple ProvisioningTemplate children. Done means older schemas apply and convert their contents, and conversion preserves every child template.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.