Content Type Hub limitations in SharePoint 2010

September 17th, 2012 | Posted by Marijn in document management | ecm | Governance | Microsoft | sharepoint 2010 | workflow

What is it?

In the 2007 version of SharePoint, Microsoft introduced Content Types: a way to define pieces of information like offers, tasks, procedures, …

You could define those Content Types on site collection level (and in sites) and add a template, metadata, workflow and policies. All documents or items created as an instance of those Content Types would have the same behavior. That was really cool!

But quickly some limitations were found. One of the biggest limitations was the need to use those content types in the whole organization, meaning in different site collections and web applications.

A lot of workarounds and scripts were developed to create Content Types and to publish them around, but that always ment you had to have a developer around.

Luckily, in SharePoint 2010, Microsoft addressed that problem and fixed it. They introduced the Content Type Hub as a part of the Managed Metadata service, a site feature that made it possible to create Content Types and have different Web Applications and Site Collections subscribe to the hub, and receive those Content Types as they were published. At long last harmony was found in the realm of SharePoint.

Now, a few years after SharePoint 2010 was released, a few limitations came to the surface.

Setting up and configuring the Content Type Hub

You can find a lot of guides on how to set up and configure the Hub online, but I use this one from SharePoint4Developers when setting it up. Contrary to the name of the site, you don’t need code to set it up, but they do offer code to automate the process.

In short, these are the steps you need to take:

–          Create a new site collection (preferably in a new Web Application) to serve as the Hub. Use a team site as template.

–          Activate the Content Type Syndication Hub feature

–          Set up or change the Managed Metadata Service to include the Hub

–          For each Content Type you want to publish, turn publishing on

–          Reference your web applications to use the Hub

–          Run the timer job

Possibilities of the Content Type Hub

–          Use the same content types in the whole organisation

–          Publish, republish or unpublish content types

–          View publishing history

–          Update published content types

–          View hub sites and content types subscribed

Migrate existing content types to the CT hub

Chances are you migrated from SharePoint 2007 or you have already started using SharePoint 2010 without the use of the hub. You can migrate your Content types via these steps:

1) Create a script to copy the current site columns and content types from Site Collections into the Hub with different names. Add a term that identifies the new site column and content type. i.e.: “Document” to “Document UP”. By doing this you get rid of the name conflict.

2) Use the script in this post to publish the new content types.

3) You will need to switch the existing content types in Lists/Document Libraries by those published (upgraded ones), so create a script to do that.

4) In the end hide the current content types (old ones), so users are not allowed to pick them up.

Special considerations

–          Make sure your content type hub site is a team site, it depends on site feature “Taxonomy feature” that is not present in an empty site

–          It is not possible to stop a site collection from getting updates from a CT hub if the web application is already linked

–          Lookup fields don’t work as expected when published from the CT hub. Use the managed metadata service for it

–          Workflow doesn’t work as expected

–          You cannot change the content type hub location once it is published

–          Create a specific site collection / web application to use as a CT hub location (best practice)

–          Custom fields and external data columns are not supported

–          You can have more then 1 CT hub

A workaround for Workflow

It is true that workflows do not get published along with the content type from the hub. That means, if you have associated a workflow to a content type and publish the content type, only the content type is published and not the workflow. You can use these steps for a workaround:

So how to approach this problem if I want to associate my workflow with the published content type? The key thing here is installing your workflow in the hub and in all the subscriber site collections.

–          Create a workflow and associate it with your content type in the hub.

–          Before publishing this content type, export the reusable workflow and import it in all the subscriber site collections or deploy your workflow to the farm if it is a farm solution

–          Activate your workflow feature

–          Now, your workflow is available in the hub as well as all the subscriber site collections.

–          Publish the content type. The workflow association will be published.

Sources:

http://www.wictorwilen.se/Post/Plan-your-SharePoint-2010-Content-Type-Hub-carefully.aspx

http://blogs.msdn.com/b/chaks/archive/2011/02/09/content-type-hub-limitations.aspx

http://www.sharepoint4developers.net/en-nz/post/sharepoint-2010-content-type-hub.aspx

http://blogs.msdn.com/b/chaks/archive/2012/05/05/workflows-and-content-type-hubs-whats-the-story.aspx

You can follow any responses to this entry through the RSS 2.0 Responses are currently closed, but you can trackback.

%d bloggers like this: