Forum Discussion
Adam Wildash
Nov 14, 2017Copper Contributor
Modern Sites - Content Type Hub Site Policy initial sync time
Hi, I'm using PnP Partner Pack to provision sites and apply site policies using the PnP Template XML (<pnp:SitePolicy>) once the site is provisioned. The site policies have been created in the co...
Praveen_Battula
Aug 02, 2019Copper Contributor
Adam Wildash This is a known issue since modern sites released. Content types will not be synced immediately to newly created sites in modern sites. It takes anywhere from 10 mins to 4 hrs in my observation.
Today, we have written a script to keep looking (wait and loop every 20 minutes) for content types available or not in site collection in post-site-creation script. We are using content types from content type hub, as site design script provision all lists and libraries which EOD uses content types. So, once content types are available we are adding content types to libraries and lists.
-Praveen.
Russell Gove
Oct 25, 2019Iron Contributor
Praveen_Battula Couldn't you just deploy the content types in your site design?
- Praveen_BattulaOct 25, 2019Copper Contributor
Russell Gove I have tried this as option 1 long time back. But, if you want a content type inheriting from content type hub, provisioning through site design have some issues. When I define a content type, site columns with same Id's in site design script the content types are available immediately. But, when I see after few hours, the content type publishing log shows errors when it syncs from content type hub.
I also using document content types, document set content types. Publishing site features is not a possible option in Site design. So, definitely adding document set content type is not a possible way for us via site design scripts as it depends on "Document Set" site feature. (Please try with document, document set, list content types in your sandbox and let us know).
Also, tried the option 2, PnP provisioning script with just 2 content types, site columns, one page in it. But, this also created problems when I see the content type publishing log of the site.
Then I chosen option 3, wrote azure Runbook and wait for the content types sync to newly created sites before I send email to owners of the site saying site is ready. Unfortunately, I observed in my experience (last 8 months) average it took over an hour for provisioning content types to newly created sites (Our customers are now ok to wait for an hour, imagine in long run waiting for such a long time for a single site). We have a hard limit of waiting 90 minutes and then kill Runbook. So, we usually get 6-9 sites fail messages to admins as they failed to get content types from content type hub within 90 minutes.
This is so frustrating that this shouldn't be this complex. Microsoft doesn't help in some situations or don't even give some direction for these kind of issues. This is a minimal thing everyone needs that how fast we are able to create team sites is not a point, how fast we are creating a site with the correct structure we need is matters. Content type hub + Modern team sites is a disaster combination as of now.
-Praveen.
- pseudoOct 25, 2019Copper Contributor
Russell Goveso I have pnp scripted the site creation for a new modern site... I have also scripted adding the content type from existing types... however it doesn't become and existing content type until 4-12 hours after the site is created. (content type doesn't technically exist)
one would suppose I could create a new type, but in the case of ever editing it, you would want it to inherit properties across enterprise I would assume. so was looking for w away to force the sync so content type is instantly available (or quickly available)
everything I have read this is not possible... but as time passes who knows.