Monday, July 18, 2011

03-07/10: List views are broken after migration.

Issue:
A source 2003 document library view has been modified by a user. Administrator performs the library migration and does not see error messages. But when the user goes to the target 2007 document library he does not see any objects there (the view is empty or contains an error message)
Example:
List views are stored in file system but the view changes are stored in database. When MM performs migration he applies changes incorrectly.
 
For example MM incorrectly migrates view in the following scenario:
You have Explorer view set as default view for the document library. When a user adds a new column the “Add to default view” option is checked and default view is modified. When administrator migrates the document library, the Explorer view is broken. It displays one column and it looks like there are no documents in the target document library.
Note: There might be other scenarios how to modify source view that MM migrates them incorrectly.
 
How to fix:
There are the following solutions: 
1. You can delete the broken view and re-create it on target site
2. You can disable view migration of a particular type of list. In this case MM will not migrate the list views. Only default list views will be created on target site.
To disable the view migration:

1. Open the "Quest Software\Migration Manager for SharePoint\MM4SP.Paging.CmdProcessor.xml" file
2. There is the following query in the "get_views_of_list":

SELECT *,page.LeafName as ViewUrl FROM [{0}].[dbo].WebParts wp
JOIN [{0}].[dbo].Docs page on page.Id = wp.tp_PageUrlID
JOIN [{0}].[dbo].Lists lists on wp.tp_ListID = lists.tp_ID
WHERE wp.tp_ListId = '{1}' and (tp_DisplayName is not null) and tp_DisplayName <> '' and wp.tp_WebPartTypeId = '7FBF9A80-8AE1-FA7E-9C51-30A786D33155' and (wp.tp_View is not null) and (lists.tp_ServerTemplate not in (106, 102))


You could add list types in addition to 102 and 106 to exclude their views.
There is a list of SharePoint list templates: http://sharepointkb.wordpress.com/2008/08/26/sharepoint-list-template-ids-registrationids-list-template-type-ids/

3. Once you added the required types, save the file and restart Source service.

If you have two agent deployment the changes should be done on both servers. 

No comments:

Post a Comment