none
Content Type creation problem - A duplicate content type was found

    Question

  • Hi,

    I'm having this problem and I didnt find any answers on the web. 

    I have a content type named "Document X" with the original "Document" as parent.

    When I create a new content type named "Document X 2" with the parent "Document X", I get the error "A duplicate content type 'Document X 2' was found"...

    I checked the ULS and the error isn't reported there. I can create new content type from any other content type (out of the box or others I created) but I cant create new one from that "Document X". (And no I dont have any content type named like that.. whatever name I use, I get the same error)

    Full error is:

    A duplicate content type "Document X" was found.
    Troubleshoot issues with Microsoft SharePoint Foundation.
    Correlation ID: b9d36bb8-1a8e-4ef4-bbd0-fbdf8e70d73b
    Date and Time: 1/24/2011 3:00:36 PM

    I know I dont have much info to give here, I just dont know where to look first.. 

    This error is happening on my content type hub site but I use and create content type on this site only.

    If anyone have any idea that could help me, I would really appreciate it as I lost a few hours on this already and dont know where to look anymore... 

    Thanks a lot,

    JP Berube

    Monday, January 24, 2011 9:59 PM

Answers

  • I am sure that a lot of people visiting this site feel uneasy about updating the content database directly. That is where I was at when I found posts like this, and so I continued to research it until I could find a way to fix it without working with the database directly, and I was able to do so. I hope this helps someone out.

    Cheers.

    http://www.mattjimison.com/blog/2011/06/21/a-duplicate-content-type-found-error/

    • Marked as answer by JP Berube Thursday, June 23, 2011 12:54 PM
    Wednesday, June 22, 2011 8:38 PM

All replies

  • Here is a post from this MSDN site which I found to be most helpful to me on this topic.

    Here is a post which shows how the inheritence of content types takes place. How it uses a base ID and adds the GUID of the new document or content to show how the inheritence path works.

     http://blogs.msdn.com/b/eigilm/archive/2007/09/04/inherit-content-types.aspx

    when I was going over your problem I found this site to be most helpful in understanding other ways to create it and change it to make it work for you.  Hope this helps.

     

    http://social.technet.microsoft.com/Forums/en-GB/sharepoint2010programming/thread/ca7b97ee-6f03-4beb-b7b8-7aa20227ac6e

     

    Gary


    Gary Newman MCSE, MCT, CCNA MCDBA, MCAD, MCSA MCTS SharePoint 2007 Dev & Admin MCPD SharePoint 2010 Development
    Monday, January 24, 2011 11:55 PM
  • Ok Now I think I understand that the ID is the problem but still dont know how to solve it. I already have a content type that inherits from my "Document X" so when I try to create an other one, it tries to use the same ID..

    So my "Document X" have an ID of 0x010100 + GUID

    and my "Document X 1" that inherits from "Document X" have an ID of 0x010100 + GUID of parent + 01

    How can I create an other content type that inherits from "Document X" with an ID of (by exemple) 0x010100 + GUID of parent + 02 ???

    Can I manage that from the Site Settings??

    Tuesday, January 25, 2011 1:08 AM
  • You've pointed it out right. In this MSDN article it says:

    Parent content type ID: 0x01
    Site content type ID:   0x0100A33D9AD9805788419BDAAC2CCB37509F
    List content type ID:   0x0100A33D9AD9805788419BDAAC2CCB37509F006454F8883E8BA648A632E5ACB47CAD9B

    Follow that logic. SharePoint internally uses .StartsWith (or BeginsWith) to determine CT hierarchy.

    I usually stick to the "00" + GUID +"00" + GUID scheme.

    If you are ever confused, use the Site Settings/UI to create them, then open up SharePoint Manager 2010 and check their ID's. Then change a few digits around and use it in your solution.

    Hope this helps!


    SharePoint 2010 MCM. Feel free to contact me http://www.sharepoint.bg/radi
    Tuesday, January 25, 2011 9:16 AM
  • What I dont understand is why SharePoint doesnt manage that when I create new content type using the "Site Settings / site content type / create" option

    Lets say I have a content type I create with the ID 0x010100ACEA2663B318874AA9192CA9AF678614

    I created a other with the last one as parent, now it gives me the ID 0x010100ACEA2663B318874AA9192CA9AF67861401

    Usually when I create a third one using the first one as parent, SharePoint gives me the ID 0x010100ACEA2663B318874AA9192CA9AF67861402 but here, with that specific content type, it doesnt work...

    the parent content type was deploy with a sandbox solution, but I dont want to add the child one using visual studio or designer as its the site administrator that will add the new content types....

    Why SharePoint doest manage that for me in that case?? And I get the same error when I create the content type from SP Designer...

    Tuesday, January 25, 2011 2:56 PM
  • Just a thought, but I'd like some feedback from Microsoft in relation to this solution. The SharePoint licensing agreement states that any modification of the content database voids the product's warranty/supportability from Microsoft. Does this qualify as acceptable practice?

    Tuesday, May 24, 2011 7:35 PM
  • Hi all,

    I had the same problem, but I was experimenting with bulk adding and deleting content types with powershell. Once I deleted the contenttypes (some where inheritting) on my CType Hub, I could never add the same bunch agan. I adapted the ID's of the contenttypes in my import/export files to re-add them. This is ofcourse only a workaround, but worked for me and beets having to remove the Hub and the MM Service App, to start over.

    I hope MS will fix this.

    regards.

    Wednesday, June 8, 2011 10:07 PM
  • I am sure that a lot of people visiting this site feel uneasy about updating the content database directly. That is where I was at when I found posts like this, and so I continued to research it until I could find a way to fix it without working with the database directly, and I was able to do so. I hope this helps someone out.

    Cheers.

    http://www.mattjimison.com/blog/2011/06/21/a-duplicate-content-type-found-error/

    • Marked as answer by JP Berube Thursday, June 23, 2011 12:54 PM
    Wednesday, June 22, 2011 8:38 PM