Tuesday, November 25, 2008

Backup/Export fails with "Guid should contain 32 digits" error

I recently encountered the very irritating "Guid should contain 32 digits" error when trying to take a backup of my site collection. On doing a google search, I came across several forum posts and websites that helped me narrow down my search in isolating the problem. If you've come across this same error, I've listed below the steps you can take to eliminate the error and be able to take a complete backup of your site collection.

Symptoms:
SharePoint Designer 2007 Site Backup fails with "Guid should contain 32 digits" error, when trying to backup a site collection. The exact error states:

"Error occurred while exporting the web http://site/
Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)."





Screenshot of the error


Cause:
The reason for this "Guid should contain 32 digits" error is that SharePoint is unable to parse the file that contains the list of activated features/components in the Site Collection.

Workaround/Solution:

  1. Open the ‘feature.xml’ file located at:
    c:\program files\common files\microsoft shared\web server extensions\12\template\features\tsatypes\
  2. Inside the ‘feature.xml’ file, look for the elements –
  3. Take a note of the two files mentioned in the child nodes. In the example above (as will be the case in most instances), the files are ‘CTypes.xml’ and ‘Fields.xml’
    On opening the two xml files, you will notice several “Field ID” tags, with the value of the ID element containing a GUID of the SharePoint component activated. The GUID is contained within curly brackets { and }.
  4. Take a backup of the xml file (Fields.xml or CTypes.xml, or both)
  5. Modify the file and remove all of the instances where the field id # has the guid with the curly brackets { }. For example,
  6. Save the changes
  7. Reset IIS
  8. Try the backup again using STDADM using the command:

stsadm -o backup -url -filename



Screenshot of successful backup