Forum Discussion
Create Site Contenttype with document template, PnP PowerShell Apply-ProvisioningTemplate error
Hi Jeroen Derde,
I think that your issue may be similar to this one:
https://github.com/SharePoint/PnP-Sites-Core/issues/758
I remember stepping throguh the code and I noticed that if your document template name doesn't match the out of the box document template then things seems to go wrong.
What is the document tmeplate's file name on your content type in question?
- Jeroen DerdeDec 05, 2016Copper Contributor
Pieter Veenstra: The templatename is word.dotx
But there is also a poweroint.potx and excel.xltx on a powerpoint and excel contenttype.
I can't use the default one's because I also want a DocumentSet derived contenttype in the library.
I was able to temporarily work around the problem by putting the templates in a "documenttemplate" doclib in the rootweb, and putting a relative path into the documenttemplate field. ie: /DocumentTemplate/word.dotx
Would still like to get it to work with the template uploaded to the contenttype. So I will try renaming it to DocumentTemplate.dotx
- DeletedDec 05, 2016
Hi Jeroen,
it is due to the fact that PNP was initialy for rootweb provisioning we have seen the same problems.
What you could do is use the {site} token if available and be sure you also provision the file to the forms gallery if necessary of the lib
- Jeroen BijdevierMay 26, 2017Copper Contributor
Hi All,
Yes have the same issue. Empty site collection, one content type with a Word template and one site colomn and I am not able to apply the template.
Placed the Word template in de source directory does not slove the issue.
Do I mis somthing?
Please help.
Apply-PnPProvisioningTemplate : urlOfFile
Parameter name: Opgegeven waarde wordt niet ondersteund voor de parameter urlOfFile.
At line:1 char:1
+ Apply-PnPProvisioningTemplate -Path template.pnp
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : WriteError: (:) [Apply-PnPProvisioningTemplate], ServerException
+ FullyQualifiedErrorId : EXCEPTION,SharePointPnP.PowerShell.Commands.Provisioning.ApplyProvisioningTemplate