Error:
One or more field types are not installed properly. Go to the list settings page to delete these fields.
After much research, I have found that this error can be the result of a couple things.
1. Programmatically create a site column / content type and the process fails. The result is a broken column that you have to hunt down and remove from the content database.
2. Using a combination of Export-SP and Import-SPweb, an imported list or library will display the error.
In my case, #2 needed to be fixed. Basically, I had a lookup column that had become orphaned from its parent list.
When you look at the field settings (Library/List Settings –> click on your lookup column) you will see that the Get information from: property is empty.
So how do you reconnect or refresh the lookup field property?
Using PowerShell, the fields web ID and source list ID schemaXML need to be populated.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | if ((Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue) -eq $null) { Add-PSSnapin "Microsoft.SharePoint.PowerShell" } $web = Get-SPWeb "http://sharepoint.com/site/" $list = $web.Lists["Broken LoopField List"] $lookupList = $web.Lists["Loopup Source List"] $fixColumn = $list.Fields["My Broken Lookup Field"] #Change schema XML on the lookup column $fixColumn.SchemaXml = $fixColumn.SchemaXml.Replace($fixColumn.LookupWebId.ToString(), $web.ID.ToString()) $fixColumn.SchemaXml = $fixColumn.SchemaXml.Replace($fixColumn.LookupList.ToString(), $lookupList.ID.ToString()) $fixColumn.Update() |
What’s going on here?
Load the SharePoint snapin.
Get site that holds the broken list / library.
Get broken list / library.
Get source list / library that the broken lookup references.
Get broken field.
Update the broken field schemaXML.