Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

When a site has been saved as template and then automatically uploaded and activated in the solution gallery and a user is trying to create a new site based on this custom template he get's an error saying:

"A duplicate field name was found."

The template site and the new site that should be created are located in the same site collection. I've found that 2 tasks list exist with the same column name.

What can i do on the site that the custom template was based on inorder to get the custom template to work? Can i import the wsp to visual studio and change any xml? What xml should i change? Can i delete the list on the template site that contains the field name and recreate the list? Can i rename

Ofcourse there is the option of recreating the template site from scratch, but i do hope it will not be necessery.

share|improve this question

2 Answers 2

Unfortunately exporting sites to WSP files isnt perfect.

Importing into Visual Studio is definately an option, but you need to know what you are doing or you may do more damage than good!

Since you seem to have tracked down the problem to the task lists, try and edit the element file containing your field definitions <Field Id=....> removing the duplicate.

Then package the file and add it to the user solution gallery.

share|improve this answer
    
Thanks Anders, i'll try that! –  Jonas F Apr 28 '11 at 8:03

I had this problem too. Not sure what caused it, but we had weeks tied up in this template. Here's how I fixed it.

Problem:

When creating a site from template: Error a duplicate field name "From" was found.

Solution:

  • Save template.wsp to desktop from solution gallery _catalogs/solutions/Forms/AllItems.aspx

  • Rename it to template.cab and extract the files to c:\newtemplate

  • Open c:\newtemplate\templateListInstances\elementsfields.xml

  • Search for the problem field and delete the line and save file

Here's where it get's tricky:

  • Run command prompt and browse to c:\newtemplate dir

  • Run this command: cabarc -r -p n newtemplate.cab *.*

  • Rename newtemplate.cab to newtemplate.wsp and reupload it to solution gallery _catalogs/solutions/Forms/AllItems.aspx

Problem solved, on to the next.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.