We have the following case:
A list created in SharePoint 2007 is imported to SharePoint 2010.
The exact method to export a list from SharePoint 2007 to 2010 was the following:
The content database containing the list in 2007 was backed up and then restored and attached to a SharePoint 2010 farm in a new web application. The content database created during the process of creating the web application is removed from the web application in Central Administration.
In order to upgrade and add the old content database to your web app you will use the following power shell command:
Mount-SPContentDatabase “MyDatabase” -DatabaseServer “MyServer” -WebApplication http://sitename
This will not only attach it to your desired web application but it will also upgrade it for SharePoint 2010. In my case it was with a lot of errors but it worked.
The errors are related to solutions which are not present in the 2010 farm but are used in the content database(web app). I was able to browse the sites in this content database using a different name.
Some columns cannot be used in 2010 due to the fact that those are custom types, but before I backup up the content DB in 2007, I created clones of the custom columns and copied the information as text, for example for the “block” column I created “block_new” to keep the information as text. I used the datasheet view to copy the information, for a small list it might work fine but for very large lists I am not sure if this is a solution. After the attach I deleted the columns which were not usable and edited the name for the clones to match the old column names.
I used Central administration to export the list to a .cmp file which was imported in a production farm.
Everything worked fine except that when I tried to add a new item to the list I got the following error:
“Web Part Error: A Web Part or Web Form Control on this Page cannot be displayed or imported. The type could not be found or it is not registered as safe.”
I started to believe that I still have problems because of the import and the customization from 2007, because I don’t really know the old farm, have no idea what was used there and started to look on Google.
The problem is a lot of people suggest a different kind of solution. In my case it was very simple, I used SharePoint Designer to connect to the site, then opened the list and created a new aspx form for new items and selected this as default. I deleted the old one after that. In my case this solved the problem and I think it is related to the fact that we used a custom form used for new items.