Wednesday

Create Document Library Error: A duplicate name 'column name' was found

Scenario:
User tries to create a document library from a custom document library template and gets the following error
"A duplicate name 'Column name' was found".




Background:
- Client's SharePoint Site Admin deletes site.
- A backup of a similar site was taken and restored where the deleted old site existed.
- A new site now has been restored with all references to the site columns of the restored site.
- The document libraries restored does not have the content type activated.
- Once you activate the content type in the newly document libraries, it creates 2 columns of the same name one with the content type and one without the content type.

The problem was that the columns in the content type that has been applied to the document library template already exists with a different GUID. The existing columns was the one that was restored and it inherited a different GUID.


Solution:

  1. Create a new Document Library, apply the content type required for the document template.
  2. Save it as a document library template using a different name.
  3. Delete the old document library template that was restored. 
  4. Rename the newly created document library template to the name of the one deleted.
Problem solved!





No comments: