SharePoint - A duplicate name "Item" was found
Asked By svenderuyte
05-Sep-07 02:40 AM

Hello,
I'm building a SharePoint 2007 site since 2 or 3 months or so. Now, all of
the sudden, when I try to create a new site collection of type "Collaboration
Portal" (publishing site), I get the following error (+ call stack):
Portal provisioning handler callout failed. Exception:
Microsoft.SharePoint.SPException: Provisioning did not succeed. Details: The
site template was not provisioned successfully. Delete this site collection
in Central Administration, and then create a new site collection.
OriginalException: Provisioning did not succeed. Details: Failed to create
the 'Cache Profiles' list. OriginalException: A duplicate name "Item" was
found. ---> Microsoft.SharePoint.SPException: Provisioning did not succeed.
Details: Failed to create the 'Cache Profiles' list.
at Microsoft.SharePoint.SPContentTypeCollection.CheckConsistency()
at Microsoft.SharePoint.SPContentTypeCollection.Update()
at Microsoft.SharePoint.SPContentTypeCollection.Add(SPContentType contentType)
at
Microsoft.SharePoint.Publishing.Internal.ProvisioningHelper.AddContentType(SPContentTypeCollection contentTypes, SPContentType contentType)
at
Microsoft.SharePoint.Publishing.Internal.ProvisioningHelper.AddContentTypeToList(SPList list, SPContentType contentType)
at
Microsoft.SharePoint.Publishing.Internal.ProvisioningHelper.ReplaceAllContentTypesOnList(SPList list, SPContentType contentType)
at
Microsoft.SharePoint.Publishing.Internal.RootProvisioner.CreateCacheProfilesList()
(I have more if you want...)
Anyone have any idea how this can suddenly happen? I haven't found any
threads about this problem on the forums, and googling only gave me 2 or 3
results with other people having this problem, but never a solution... As you
can imagine this is a big problem because I can't seem to enable Publishing
anymore! (the same problem appears when activating the Publishing
Infrastructure feature)
Any comments are welcome!
Sven
SPContentTypeCollection
(1)
SPContentType
(1)
SPList
(1)
SharePoint
(1)
Export.ImportExport.button2
(1)
IsParentSystemObject
(1)
ContentTypeID
(1)
ImportObjectManager
(1)
svenderuyte replied...

OK... I managed to solve this problem! It has cost me a few hours but I'm
glad to have it working again.
When I looked at the site content types on an existing site, I noticed that
a lot of default content types (like tasks, announcements, etc) were just not
in the list. Only "Item", "Document" and all content types deriving from
that derives from "Item"). So I thought: maybe something's wrong with the
content types. So deactivating and activating the CTYPES feature was my next
option... no luck :(. Then I remembered that I had just added some content
types in a feature. I noticed that, in the ContentTypeID, I forgot to add two
zero's (00) to the parent ContentTypeID before adding my own GUID. I couldn't
deactivate my ContentTypes feature anymore (it threw an exception saying it
couldn't find the parent contenttype), so I edited my contenttypes.xml file
directly in the 12\TEMPLATE\FEATURES directory and added the necessary 00's.
Then I did an IISRESET and voila, my default content types were back and I
was again able to create Publishing sites!
Hope this helps someone!
Sven
Roberto Sandriano replied...

Hi Sven,
I get similar exception while deploying content from source to destination. Any help would be highly appreciated.
A duplicate name "LoginContentType" was found. Stack Trace: at Microsoft.SharePoint.SPContentTypeCollection.Add(SPContentType contentType)
at Microsoft.SharePoint.Deployment.ContentTypeSerializer.CreateContentType(SPContentType sourceContentType)
at Microsoft.SharePoint.Deployment.ContentTypeSerializer.ProcessContentType(SPContentType sourceContentType, String contentTypeXml, ImportObjectManager importObjectManager, Boolean IsParentSystemObject)
at Microsoft.SharePoint.Deployment.ContentTypeSerializer.SetObjectData(Object obj, SerializationInfo info, StreamingContext context, ISurrogateSelector selector)
at Microsoft.SharePoint.Deployment.XmlFormatter.ParseObject(Type objectType, Boolean isChildObject)
at Microsoft.SharePoint.Deployment.XmlFormatter.DeserializeObject(Type objectType, Boolean isChildObject, DeploymentObject envelope)
at Microsoft.SharePoint.Deployment.XmlFormatter.Deserialize(Stream serializationStream)
at Microsoft.SharePoint.Deployment.ObjectSerializer.Deserialize(Stream serializationStream)
at Microsoft.SharePoint.Deployment.ImportObjectManager.ProcessObject(XmlReader xmlReader)
at Microsoft.SharePoint.Deployment.SPImport.DeserializeObjects()
at Microsoft.SharePoint.Deployment.SPImport.Run()
at Export.ImportExport.button2_Click(Object sender, EventArgs e)
level, I get the following error: A duplicate name "Folder" was found. at Microsoft.SharePoint.SPContentTypeCollection.CheckConsistency() at Microsoft.SharePoint.SPContentTypeCollection.Update() at Microsoft.SharePoint.SPContentTypeCollection.Add(SPContentType contentType) at Microsoft.SharePoint.Publishing.Internal.ProvisioningHelper.AddContentType(SPContentTypeCollection contentTypes, SPContentType contentType) at Microsoft.SharePoint.Publishing.Internal.ProvisioningHelper.AddContentTypeToList SPList list, SPContentType contentType) at Microsoft.SharePoint.Publishing.Internal.RootProvisioner.CreateCacheProfilesList() I am kind of stuck with this
We had added two additional fields in it. Exception also says lots of problems at SPContentType add, derive etc. We removed the columns but in vain. We deactivated the publishing feature exceptions. Exception: Object reference not set to an instance of an object. at Microsoft.SharePoint.SPContentType.ProvisionFieldOnList(SPField field, Boolean bRecurAllowed) at Microsoft.SharePoint.SPContentType.ProvisionFieldsOnList() at Microsoft.SharePoint.SPContentType.DeriveContentType(SPContentTypeCollection cts, SPContentType& ctNew) at Microsoft.SharePoint.SPContentTypeCollection.DeriveContentType(SPContentType ct, SPContentType& ctNew) at Microsoft.SharePoint.SPContentTypeCollection.AddContentTypeToList(SPContentType contentType) at Microsoft.SharePoint.SPContentTypeCollection.Add
range. at Microsoft.SharePoint.SPRoleDefinitionCollection.GetByType(SPRoleType roleType) at Microsoft.SharePoint.Publishing.Internal.RootProvisioner.AddSecuritySettings(SPList styleLibrary, SPList quickDeployItemsLists, SPList cacheProfileList, SPList lroList, SPList variationRelationshipList, SPList variationLabelsList) - -- End of inner exception stack trace - -- at Microsoft.SharePoint.Publishing. . . . General 8grz High . . .Internal.RootProvisioner.AddSecuritySettings(SPList styleLibrary, SPList quickDeployItemsLists, SPList cacheProfileList, SPList lroList, SPList variationRelationshipList, SPList variationLabelsList) at Microsoft.SharePoint.Publishing.Internal.RootProvisioner