This is another strange errorĀ I got when trying to create a site or a site collection. At the time I wrote this there was only one post about this error:
http://www.eggheadcafe.com/software/aspnet/30673124/a-duplicate-name-item-w.aspx
I was experiencing exactly the same symptoms as described in the above post. However the case there was due to forgotten two zeroes between the system content type you are inheriting from and your GUID.
However this was not my case. After an hour or more investigation I found that some of the IDs of our content types were recently updated to have a different parent. However one of them was missed out so we were having an id such as:
or if I split it
0×0101 + 00 + GUID-OF-THE-PARENT-CONTENT-TYPE + 02
That is the id of the “Item” content type + the two zeroes you shouldn’t forget (which if you do will lead to the same error message) + the GUID of the parent content type + the unique part of this child content type (02 in this case).
So the problem was that the parent content type didn’t exist anymore and after updating the GUID with the new one everything was working again.
Hope this could be useful to someone.