Skip to main content

Cloud

Problem deploying content types that inherit during SharePoint 2010 upgrade

I am currently on a project to upgrade a custom SharePoint 2007 public facing internet site to SharePoint 2010. While testing out our custom site templates by provisioning sites we ran into some issues with custom content types supposedly not existing during the provisioning. This was very perplexing as these content type definitions deployed fine in SharePoint 2007. Doing a lot of testing we tracked the issue down to the content type ID. All of the content types that would not deploy inherited from the built in ‘Page’ content type so they all started with ‘0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF39’ then, following the content type ID guidelines, we added ‘00’ and then a new GUID for our custom page base and anything inheriting from this base had ‘01’, ‘02’, etc. on the end of the ID. When we activated the feature that contained these content types on a different site collection there was no error however we could not see the content types either in the UI or by listing them with PowerShell, but it did exist in the content database. This was a very perplexing situation as nothing was telling us why these content types wouldn’t show up, the site columns were deploying fine, the ID was created according to guidelines, the ID was being deployed to the content database, it worked in 2007, and we weren’t seeing any telling errors when deploying this feature on other sites.
So, after nearly giving the team a heart attack by telling them, “We may not be able to do a database attach at all,” (this would mean 1+ months solid of loading data to our site to get it back to where our 2007 environment is) and spending nearly a day and a half googleing/binging and trying to figure out why our IDs were broken, I FOUND THE SOLUTION. This is basically a reminder to everyone doing an upgrade to SharePoint 2010: Always look at where things have changed between versions (especially for things that are xml definitions and not compiled code). Yes that’s right there is a new property on the ContentType element in SharePoint 2010. If you look at the MSDN article on the ContentType element you will notice the ‘Inherits’ property which was not in SharePoint 2007. If your content types are inheriting from out of the box SharePoint content types you MUST include ‘Inherits=”TRUE”’ in your ContentType element.
I will definitely be looking for these types of ‘gotchas’ much sooner in the future. Hopefully the day and a half I spent banging my head against the wall will help some of you going through this same process.

Thoughts on “Problem deploying content types that inherit during SharePoint 2010 upgrade”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Brian Hulse

More from this Author

Follow Us