You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 19, 2021. It is now read-only.
PnP Site Provisioning to function without error when creating sites based off of a template which uses content types from a content type hub
Observed Behavior
PnP Site provisioning does not seem to copy content types which are rooted from a content type hub. PnP Site Provisioning fails when creating Lists/List views referencing a content type which was based on a content type hub
Steps to Reproduce
Build a content type hub and add some content types
Create a site collection with lists. Add the content type from Initial structures #1 to that list
I am wondering if anyone here has any suggestions/advise/best practice for working with PnP Site Provisioning along-side of a content type hub. Any workaround folks here have used would be very helpful.
There is a PR #2565 which has been added to ignore content types from a hub, which is certainly an option (the PR is still being reviewed)
The text was updated successfully, but these errors were encountered:
I have this exact same use case for provisioning a custom site template and would love to know best practice guidance.
How I got it to work (kind of)
My provisioning template (XML), amongst other things, creates two custom content types referring to pre-existing content types from my Content Type Hub (one inherits from Document and has optional Site Columns attached; the other from Document Set and has optional Site Columns attached) and two document libraries which it then adds those content types to. The content types in my PnP XML template use the same ID as they have in the Content Type Hub. I do this because I want the content types on my newly created site to update when the next CTH timer job occurs.
I got this working but had to remove the <pnp:FieldRefs> from my <pnp:ContentType> for the content type that inherits from Document Set.
This works fine for me when running from PowerShell on my machine, however when I run the same code via an Azure Automation Runbook I get weird "Object reference not set to an instance of an object" errors saying "Cannot bind argument to parameter 'List' because its null".
Category
[ ] Bug
[ ] Enhancement
[x] Question
Environment
[x ] Office 365 / SharePoint Online
[ ] SharePoint 2016
[ ] SharePoint 2013
Expected or Desired Behavior
PnP Site Provisioning to function without error when creating sites based off of a template which uses content types from a content type hub
Observed Behavior
PnP Site provisioning does not seem to copy content types which are rooted from a content type hub. PnP Site Provisioning fails when creating Lists/List views referencing a content type which was based on a content type hub
Steps to Reproduce
Question
I am wondering if anyone here has any suggestions/advise/best practice for working with PnP Site Provisioning along-side of a content type hub. Any workaround folks here have used would be very helpful.
There is a PR #2565 which has been added to ignore content types from a hub, which is certainly an option (the PR is still being reviewed)
The text was updated successfully, but these errors were encountered: