STSADM Import Error
We recently had several sub-sites within a site collection that needed to be moved to other site collections. These sites have workflows that have been built in SharePoint Designer and some of the lists have custom event handlers. We needed those items (especially the workflows) to migrate as well. The stsadm export/import command seemed to be a good fit to do this.
However, I encountered a problem. The export worked fine, but the import produced the following error:
Progress: Importing File DocLib/Forms/WebFldr.aspx.
FatalError: Value cannot be null.
Parameter name: g
at System.Guid..ctor(String g)
at Microsoft.SharePoint.Deployment.FieldTemplateSerializer.FixLookupFieldSchema(XmlNode fieldNode, Guid parentWebId, Guid fieldId)
at Microsoft.SharePoint.Deployment.FieldTemplateSerializer.CreateField (SPWebweb,SerializationInfoHelper infoHelper)
at Microsoft.SharePoint.Deployment.FieldTemplateSerializer.SetObjectData(Object obj, SerializationInfo info, StreamingContext context, ISurrogateSelector selector)
at Microsoft.SharePoint.Deployment.XmlFormatter.ParseObject(Type objectType, Boolean isChildObject)
at Microsoft.SharePoint.Deployment.XmlFormatter.DeserializeObject(Type object Type, Boolean isChildObject, DeploymentObject envelope)
at Microsoft.SharePoint.Deployment.XmlFormatter.Deserialize(Stream serializationStream)
at Microsoft.SharePoint.Deployment.ObjectSerializer.Deserialize(Stream serializationStream)
at Microsoft.SharePoint.Deployment.ImportObjectManager.ProcessObject(XmlReader xmlReader)
at Microsoft.SharePoint.Deployment.SPImport.DeserializeObjects()
at Microsoft.SharePoint.Deployment.SPImport.Run()
My initial thought was that a lookup field in the “DocLib” document library created the problem. Just to test it, I removed the document library and tried the export/import again. The error occurred again for the item above the document library I removed. I continued to remove lists and the error continued to move up the list of items exported.
It turns out the problem is a bug that affects custom site columns. In my case there was a single site column that had been created and was associated with a custom content type. I removed the column from the content type, deleted the column, recreated the column, and added it back to the content type. I repeated the export/import and this time it completed successfully.
This is a known issue where the webID property is not set for a site column. You can use WFETCH to call the GetColumns method of the /_vti_bin/webs.asmx web service to see the column properties. Once the output is collected, you can search for "<Field List". This will take you to site column definitions. Each column should have should have a webid attribute. If one or more do not, that is the source of this problem.
This is one of those obscure problems that can drive you nuts. Hopefully, if anyone else encounters the same issue this post will be helpful.
I think I’m going mad.
I’m trying to track that “value cannot be null” error when calling GetListItems in lists.asmx.
And in desperation I tried this.
However, the XML from GetColums that I get does not contain a “Field List” (with or without a space in the name), nor a “web id” (with or without a space in the name)
Roger,
I can relate and I suspect there are probably a number of things that can create this error. It seems to be a difficult one to isolate and took a couple of days working with a MS engineer to isolate my case. If you have columns added to a custom content type, try removing them from the content type, removing the columns, recreating the columns, and then adding them back to the content type. If that doesn’t work, it is probably worth it to contact MS for support.