SharePoint 2010: The parent content type specified… does not exist

Recently I was creating some custom content types for SharePoint 2010 and deploying them via a feature I created in Visual Studio 2010.

Upon trying to activate my feature, I got this error message: “The parent content type specified by content type identifier {ContentTypeId} does not exist,” where {ContentTypeId} was the ID of my content type.

After doing some testing, I discovered that the order in which the content types appear in the feature definition (declarative XML) was the problem. A parent content type must appear earlier than its child in the XML (which I haven’t seen documented, but I guess it makes sense given how SharePoint processes the XML).

Unfortunately, fixing the order wasn’t an easy as I would’ve liked. My project had around 30 content types, and I would’ve preferred to use the new feature designer in VS 2010 to simply reorder the content types and fix the problem.

However, the feature designer doesn’t include “up” and “down” buttons for reordering items. The package/solution designer seems to have that capability (for reordering features), but it’s missing in the feature designer. So that leaves you with two options: Either remove items and re-add them (in the correct order), or manually edit the XML and fix the order there.

3 thoughts on “SharePoint 2010: The parent content type specified… does not exist

Comments are closed.