Forum Discussion

Bernd Verhofstadt's avatar
Bernd Verhofstadt
Iron Contributor
Oct 16, 2018

Best practice for provisioning Content Types on Modern Sites

Hi,

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.

 

Cheers

Bernd

 

 

11 Replies

  • Scalcagno's avatar
    Scalcagno
    Copper Contributor
    Are there any updates on this topic ?
    Still have this issue while provisioning with site design & site script
    • Beau Cameron's avatar
      Beau Cameron
      MVP

      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.

      • DarwinPou's avatar
        DarwinPou
        Copper Contributor

        Beau Cameron 

        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.

  • Bernd Verhofstadt 

    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....

    • Bernd Verhofstadt's avatar
      Bernd Verhofstadt
      Iron Contributor

      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.

      Cheers

      Bernd

      • Praveen_Battula's avatar
        Praveen_Battula
        Copper Contributor

        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? 

         

        thanks

        -Praveen.

    • Bernd Verhofstadt's avatar
      Bernd Verhofstadt
      Iron Contributor
      That's a possible alternative. unfortunately these approach does not meet our requirements. PnP Provisioning engine provides a lot more flexibility.

Resources