Oct 16 2018 01:31 AM
Oct 16 2018 01:31 AM
I'm looking for the best way to work with content types on modern sites.
Currently the Content Type Hub (cth) is used for our classic sites and can't be deactivated.
We started a new project to provision modern sites wit PnP Provisioning Engine.
If a modern site is created, the content types from the content type hub are not available for some time. Adding content types from the cth to list or libraries makes this impossible for the provisioning engine.
I see a few options
1. Create a modern site that won't get the content types from the cth and add create content types manual on the template site collection.
I don't see how we can technically make this possible...
2. Reuse the provisioned content types from the content type hub in the template site
This might give a conflict when the content types are provisioned by the PnP Prov Engine and not by the content type hub, not sure if this is a valid argument.
3. Create (next to the one from the cth) new content types in the template site.
there will be an overlap of content types... This approach makes it more difficult for reporting or search queries.
I'm looking forward to your ideas or best practices.
Oct 16 2018 03:41 AM
Oct 16 2018 11:54 PM
Mar 27 2019 12:44 PM
How did you manage it out, finally? I have the exact same question.
I was told that you could simply provision the same Content Type name and ID from a site script (and add it to a library at the same time) and the Content Type Hub would hook up after and add the missing columns. I just tested it and it did not work at all. Error logs state that the CT already exists....
Mar 28 2019 12:51 AM
@Francis Laurin we are currently using the pnp provisioning engine.
We created new content types and reused the fields from the content type hub.
It is easy to export fields from existing sites with pnp... After you added everything to your template you can start provisioning. The content type hub will add all the other (unused) fields.
Sep 23 2019 01:50 PM
@Bernd Verhofstadt @Francis Laurin So you have created new content types with same id, name from the content type hub and added all the existing fields from content type hub to your site design script or pnp provisioning engine?
If yes, did that work when the next content type sync happened? Are there any issues like when we publish from content type hub by adding or removing fields did that sync to all these site collection content types without any issue?
Sep 23 2019 02:17 PM
@Praveen_Battula, in my case, it never hooked up with the CT Hub. Synchronization logs showed error as the CTH complained that the columns already existed. I eliminated completely the CTH from my solution and only used Site Design and PNP Provisioning. It is a pain to update, though (need to update the script/template + apply changes via PowerShell on existing sites).
Sep 23 2019 02:21 PM
Reading again @Bernd Verhofstadt comments, he says that the PNP provisioning should just provision the Content Type and not the fields (columns). This is how the CTH could pick it up and add the columns after. The problem with that is that when you provision a site, you expect to add your columns to list views which is impossible if you wait for the CTH to add them asynchronously, after the Site Design/PnP Provisioning application.
Apr 24 2020 03:17 AM
Apr 26 2020 08:53 AM
@Scalcagno My recommendation would be to avoid using the Content Type Hub in SharePoint Online. As you can see above, there are frequent syndication issues with it in SharePoint Online. I would just recommend deploying content types via Site Designs only. The con obviously is that you can't publish new updates to content types without custom code.
So be very thorough with planning out an Information Architecture.
May 30 2020 01:08 PM
I have published my content type in the content types hub in my tenant. They are visible in Subscribed Content Type. I don't understand why are not visible for Modern Sites in my tenant. My tenant home site is a classic team site.
Jun 04 2020 01:45 PM