Open awdhaan opened 5 years ago
Got almost the same issue.
The script suddenly stopped working :(
Apply-PnPProvisioningTemplate : Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index Innholdstypen xxxx liggende på /sites/pr-testxxx/ er skrivebeskyttet.
Translated: Contenttype xxxx in /sites/pr-testxxx/ is write protected
Using Apply-PnPProvisioningTemplate for a site with multiple content types (25) in hierachy e.g.: OOB Document > Customer document > Action OOB Document > Customer document > Action > Action English
Content types are associated to lists (4), including the default library for the modern team site.
Reporting an Issue or Missing Feature
Provisioning crashes upon associating content types on list level.
Expected behavior
All content types should be associated to the list without error when provisioning the site template for multiple site collections.
Actual behavior
This issue occurs when provisioning multiple sites in bulk When PnP provisioning is working on the list level (associating the content types), an error is thrown that a specific content type (this seems random) is set to read-only. This breaks the provisioning without completing the remaining list and page configurations.
The error (in Dutch) is as follows:
Het inhoudstype Agenda ENG op /sites/TemplateTest100/Conceptdocumenten heeft het kenmerk Alleen-lezen.
Steps to reproduce behavior
Which version of the PnP-PowerShell Cmdlets are you using?
What is the version of the Cmdlet module you are running?
3.6.1902.2
How did you install the PnP-PowerShell Cmdlets?
] Installed through the PowerShell Gallery with Install-Module
Xml template is attached as zip. PnPTemplateDepartment.zip