Recently I’ve been working to migrate a custom content type deployed with a feature from SharePoint 2007 to SharePoint 2010 resulting in a lot of errors.
Depending on what changes I made to the content type xml file I got different errors:
Unable to locate the xml-definition for CType with SPContentTypeId '0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF390027E3522FA4F2451E8AF57D3CC9D40BF10A', exception: Microsoft.SharePoint.SPException ---> System.Runtime.InteropServices.COMException (0x8000FFFF): <nativehr>0x8000ffff</nativehr><nativestack></nativestack>
at Microsoft.SharePoint.Library.SPRequestInternalClass.GetGlobalContentTypeXml(String bstrUrl, Int32 type, UInt32 lcid, Object varIdBytes)
at Microsoft.SharePoint.Library.SPRequest.GetGlobalContentTypeXml(String bstrUrl, Int32 type, UInt32 lcid, Object varIdBytes) -
-- End of inner exception stack trace ---
at Microsoft.SharePoint.SPGlobal.HandleComException(COMException comEx)
at Microsoft.SharePoint.Library.SPRequest.GetGlobalContentTypeXml(String bstrUrl, Int32 type, UInt32 lcid, Object varIdBytes)
at Microsoft.SharePoint.SPContentTypeCollection.FillCollection(SPRequest req, SqlDataReader rdr, Boolean openWeb)
<nativehr>0x8107058a</nativehr><nativestack></nativestack>Specified argument was out of the range of valid values.
Parameter name: Content type not found (Id: '0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF390027E3522FA4F2451E8AF57D3CC9D40BF10A').
Another error I found in the ULS log file was:
Failed to find the parent content type ID="ct-0-0x010100c568db52d9d0a14d9b2fdcc96666e9f2007948130ec3db064584e219954237af39" for content type ID="ct-0-0x010100c568db52d9d0a14d9b2fdcc96666e9f2007948130ec3db064584e219954237af390027e3522fa4f2451e8af57d3cc9d40bf1".
Failed to fill in the content type XML for ct-1033-0x010100c568db52d9d0a14d9b2fdcc96666e9f2007948130ec3db064584e219954237af390027e3522fa4f2451e8af57d3cc9d40bf1 from the parent content type. Error 0x80004005:
<nativehr>0x8107058a</nativehr><nativestack></nativestack>The parent content type specified by content type identifier 0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF390027E3522FA4F2451E8AF57D3CC9D40BF1 does not exist.
After a short search I found the solution where it was suggested to insert the following code in the content type definition:
<ContentType ID="SOME_ID"
Name="NAME"
Group="GROUP"
Description="DESCRIPTION"
Overwrite="TRUE"
Version="0">
<FieldRefs>
<FieldRef ID="..." Name="NAME" />
...
</FieldRefs>
<DocumentTemplate TargetName="/_layouts/CreatePage.aspx" />
</ContentType>
Including Overwrite=”True” I was able to successfully create a new site collection with my custom content type definition.