Invoke-PnPSiteTemplate Template is not valid with ClientSidePages #1371
Unanswered
ferrarirosso
asked this question in
Show and tell
Replies: 1 comment
-
I found a similar issue. that happened whenever I updated/saved a tenant template. My workaround was to open the template as an XML object and manipulate the node ordering to ensure that |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I just got the following error and can share the solution.
Export-PnPPage -Identity "MyTemplateV1" -Out "mytemplatev1.xml"
Invoke-PnPSiteTemplate -path mytemplatev1.xml
Invoke-PnPSiteTemplate: Template is not valid
PS C:\Data\Dev\sources\pagetemplates> Get-PnPException
Message : Template is not valid
Stacktrace : at PnP.Framework.Provisioning.Providers.Xml.XmlPnPSchemaBaseSerializer
1.ProcessInputStream(Stream template, String identifier, ProvisioningTemplate result) at PnP.Framework.Provisioning.Providers.Xml.XmlPnPSchemaBaseSerializer
1.ToProvisioningTemplate(Stream template, String identifier)at PnP.Framework.Provisioning.Providers.Xml.XMLPnPSchemaFormatter.ToProvisioningTemplate(Stream template, String identifier)
at PnP.Framework.Provisioning.Providers.Xml.XMLTemplateProvider.GetTemplate(String uri, String identifier, ITemplateFormatter formatter, ITemplateProviderExtension[] extensions)
at PnP.Framework.Provisioning.Providers.Xml.XMLTemplateProvider.GetTemplate(String uri, ITemplateProviderExtension[] extensions)
at PnP.PowerShell.Commands.Provisioning.Site.InvokeSiteTemplate.ExecuteCmdlet() in c:\PnPPowerShell\src\Commands\Provisioning\Site\InvokeSiteTemplate.cs:line 150
at PnP.PowerShell.Commands.PnPSharePointCmdlet.ProcessRecord() in c:\PnPPowerShell\src\Commands\Base\PnPSharePointCmdlet.cs:line 60
ScriptLineNumber : 1
At the end of the template, I noticed this line :
<pnp:Preferences Generator="PnP.Framework, Version=1.6.0.0, Culture=neutral, PublicKeyToken=null" />
After removing this line, Invoke-PnPSiteTemplate runs without error :-)
Beta Was this translation helpful? Give feedback.
All reactions