I have the following code:


It works on my dev environment, but on test fails with the following error:

A duplicate field name "[GUID]" was found.

I've had several attempts at trying to find this field that it complains about via powershell (really simple script to get the web and then attempt to get the field by id) and it can't find it anywhere.

Can anybody please help me identify a possible cause for this duplicate field when I can't even find it?

Please note, I've tried this on different webs and the GUID is exactly the same, so it's a site column/field that exists and the site collection level I'm assuming (I've even ran the powershell script against the site's root web).

EDIT: I've also searched my solution for this guid - couldn't find it.

  • Let us see your content type defintion – James Love Nov 27 '12 at 19:32

Try the SharePoint Manager to find the duplicated field ID in the existing Site collection or on the relevent lists. Hopefully you will found it.

I wonder if it is possible for you to change the GUID of the field, causing the problem?


Add-PSSnapin Microsoft.SharePoint.PowerShell -erroraction SilentlyContinue
$site = Get-SPSite "http://your.site.com"
foreach($web in $site.AllWebs)
    #iterates through all the Lists        
    for ($i = 0; $i -lt $web.Lists.Count; $i++) 
      $list = $web.Lists[$i];                               
      $MyListContentTypes = $list.ContentTypes                                                          
      if ($MyListContentTypes -ne $null)

         $cts = $list.ContentTypes
         foreach($ct in $cts)


  • Thanks a LOT for your reply Falak. I can't appear to find the id in any of the content types? – JᴀʏMᴇᴇ Nov 30 '12 at 10:53
  • Are you sure the field is not hidden? Can you paste the ContentTypes provisioning code? – Falak Mahmood Nov 30 '12 at 14:49
  • Have you changed the GUID of the field causing the problem? – Falak Mahmood Dec 1 '12 at 17:20
  • I can't change the GUID of the field because I don't know what field it is. – JᴀʏMᴇᴇ Dec 3 '12 at 10:20
  • 1
    Great to know that :). Mark it as answer if it has helped you :) – Falak Mahmood Dec 4 '12 at 9:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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