Forum Discussion
Alex_1997
Jun 03, 2021Copper Contributor
DeployToSubsite
Good morning,
I am trying to deploy a main site template to a sub site but I get the following error:
Invoke-PnPSiteTemplate: Scope of template does not match target
would there be a way to deploy maybe with another command?
- andrea_rucciMicrosoftHi Alex,
what kind of object are you trying to deploy? If the scope is not correct maybe that you are deploying a Site template in a subsite.
In the XML you should see something like:
<pnp:ProvisioningTemplate ID="TEMPLATE-8F4D883BE25B442FB9F889C351D3EA0B" Version="1" BaseSiteTemplate="SITEPAGEPUBLISHING#0" Scope="RootSite">
If the scope is RootSite you can not deploy it as a subsite.
Hope this helps- Alex_1997Copper Contributor
Thanks a lot, it was helpful. Unfortunately now I find a different error while I deploy: Invoke-PnPSiteTemplate: Duplicate field name found is there no way to make it ignore the duplicate elements?
- andrea_rucciMicrosoftHi Alex,
you can have no duplicate internal name fields in SP.
You could modify the internal name mantaining the same display name.
Is the errore regarding a custom or native column?