Home > SharePoint 2010, SharePoint Problems/Issues > Finding: A Duplicate Field Name [GUID] Was Found Error in SharePoint 2010

Finding: A Duplicate Field Name [GUID] Was Found Error in SharePoint 2010

I was recently Exporting and Importing a SharePoint 2010 Site Collection in my SharePoint environment and I ran into  this error when trying to Import the Exported Site Collection into a brand new Site Collection:

“A duplicate field name “<GUID>” was found”

If you run into this problem, to determine what duplicate field name its causing this error, run this PowerShell script.

1.  Open up notepad, paste the script, change the Get-SPWeb and the “<GUID>” attributes and save the file with the .ps1 extension.

$web = Get-SPWeb “http://portal&#8221;
foreach ($field in $web.Fields)
{
if($field.Id -eq “<GUID>”)
{
write-output “Title: $($field.Title) | ID: $($field.Id)”
}
}
$web.Dispose()

2.  Open up SharePoint 2010 Management Shell, change directory to the location you saved the .ps1.
3.  Execute the .ps1
4.  Once Executed you will see the name of the duplicate field and its ID.

Now you can go back to your Site Collection and delete that duplicate field, and try your Export/Import again.

Advertisements
  1. Tom
    February 18, 2013 at 3:52 pm

    James, this is a really cool script. Thank you for posting it.

    Have you ever seen it where this script doesn’t pick up the field name of the GUID being reported as a duplicate?

    I’ve run this script and I get nothing back. I modified it to give me all of the fields back with their GUIDs so I could get my eyes on them, and it appears that the original script is working properly, but there doesn’t appear to be a field using the GID reported in the error message.

    I tried running your script on all of the sites hosted on that SP instance (including the central admin site). I even tried running it on the source site to see if I could pick it up from there, but to no avail.

    • February 19, 2013 at 8:55 am

      Hi Tom,

      Are you using any content types? I’ve seen it not return any fields back if there are any orphaned content types that still live in the DB. If you look at the ULS logs what does correlation ID reference for GUID?

      • Eckert, Tom
        February 19, 2013 at 8:04 pm

        James,

        Thank you for your timely response.

        How do I tell if I’m using any content types?

        How would I fix orphaned content types?

        Here’s what I’m seeing in the ULS logs. Does this mean that there is a problem with the ‘Content and Structure Reports’ list? If so, how can I fix this?

        I see an active feature (in the site scope) that is not on the destination site. I haven’t figured out how to export it and import it to the destination site yet.

        F. Thomas Eckert

        Web Application Infrastructure Specialist

        Application Administration Team

      • Eckert, Tom
        February 19, 2013 at 8:50 pm

        My attachments didn’t appear to come through, so I’ll include the content in text.

        Is this the piece you were looking for, James?

        Content Migratic nasm [List] [Content and Structure Reports] a duplicate field name ‘GUID’ was found. ‘GUID2’

        I looked into the ‘Content and Structure Reports’ list and they look the same on the new site and the site I’m exported from.

        The site-scoped feature I mentioned earlier is called ‘Web Template feature of exported web template Navigator’

        Could this be the site template that I exported in an attempt to import it into the destination site. (BTW, this didn’t work at all)

        Thank you again for your assistance in this matter.

      • February 19, 2013 at 10:20 pm

        Hi Tom,

        Are you trying to import a list from Web Application A to Web Application B? What happens if you delete The List from Web Application B and try to import the list again from Web Application A? Do you get the same error?

      • Eckert, Tom
        February 19, 2013 at 10:29 pm

        James,

        I have a production intranet that I’m trying to duplicate into two other environments (Development and Test). This intranet has 107 sub-sites and I’m trying to migrate the entire thing. This site was originally set up in WSS3.0 and then migrated to 2007. Recently, we migrated it to 2010. Apparently, the template that was used to create it is now obsolete, but the content refuses to be imported into a site created off a different template than the originating site. I had to create the site with the following script in order to get it to use the obsolete template.

        New-SPSite -Template “SPS#0” -Name “Site Title” -Url “http://sitename:port” -OwnerAlias “domain\username

        I’m not confident I know which list is causing the issues. Would it definitely be the ‘Content and Structure Reports’ list that’s stopping the import? Once I know which list is the culprit, I can try deleting it from the destination site and then importing it.

        Tom

      • February 19, 2013 at 10:43 pm

        Hi Tom,

        Have you seen my blog about importing lists from one SP2010 Web Application to a different Web Application.

        http://jshidell.com/2012/04/30/importing-sharepoint-2010-listsdocument-libraries-from-backup-directory-using-powershell/

        This will iterate through all the lists and import, and if there is an error with one of the list you will see which list is causing the problem. Once you know you can delete it.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: