Unable to display XSLT Dataviews after backup/restore

June 3rd, 2008 | Tags:

If you’ve done a backup & restore of a single site (using either stsadm import or SharePoint designer) which has customized XSLT dataviews, you will get the error "Unable to display this Web Part. To troubleshoot the problem, open this Web page in a Windows SharePoint Services-compatible HTML editor such as Microsoft Office SharePoint Designer. If the problem persists, contact your Web server administrator".

The problem here is that, when you convert a webpart to a XSLT dataview, it creates a datasource in the background which points to the list used. The reference to the datasource is given using the ‘GUID’ of the list. So, when we do a backup/restore, the new list created will have a GUID different from that of the original list. However, the restore does not update the original links with the new GUID. Hence, the View is unable to fetch data from the datasource.

To resolve this issue, you have to open the page (which displays the view) in SharePoint designer and do a ‘Search/Replace’ of the original list id with the new list id.

You can use my small utility (SharePointTools) mentioned in the ‘Absolute path information‘ post below to get the GUIDs for all the lists in the site.

No comments yet.