How to fix: Recieve error "Unable to display this Web Part" on Data Views after restoring site from ...

How to fix: Recieve error "Unable to display this Web Part" on Data Views after restoring site from backup

Symptoms:

After restoring a SharePoint site using site template .STP files, .CMP files, or the stsadm commands import / export all data views / data forms show error messages.

Web browser 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."

SharePoint Designer error
: "The server returned a non-specific error when trying to get data from the data source. Check the format and content of your query and try again. If the problem persists, contact the server administrator."

Cause:

This is a known issue, actually. We have done some work for O14 which will address this problem. The issue is caused by the incorrect ListName, which is a GUID id for the list's instance on a given site instance. We don't do GUID fix-up, and therefore the broken data views are pointing to the incorrect data source (from the old site).

Workaround:

  1. Start SharePoint Designer, and open page containing broken data view(s).
  2. In SharePoint Designer's menu, click Task Panes -> Data Source Library.
  3. From the Data Source Library task pane, drag in a new instance of the broken data view's data source (example: Announcements list) onto the page. This will create a new and working data view.
  4. Highlight the newly inserted data view, and go into split view (half code, half design). From the code portion highlighted, look for the ListName property. Note: it should be on the first line of the highlighted code, but you may have to scroll to the right in order to see it.
  5. Once you find the ListName property, copy everything in between { ... } (without the braces). Store that value, as we will need it later (example: paste into Notepad).
  6. Remove the newly inserted data view.
  7. Highlight the broken data view, and go into split view (half code, half design). From the code portion highlighted, look for the ListName Property. Note: it should be on the first line of the highlighted code, but you may have to scroll to the right in order to see it.
  8. Once you find the ListName property, copy everything in between { ... } (without the braces).
  9. In SharePoint Designer's menu, click Edit -> Replace. In the "Find What" portion, paste in the broken data views ListName value. In the "Replace With" portion, paste in the previous working data view's ListName value (example: the one stored in Notepad). Click Replace All, and let the process finish. Click close.
  10. Perform steps 3 - 9 for each respective data view.

I've seen several support instances with questions and concerns on this problem. Hopefully, this helps you to understand the cause of the problem, and how to fix it.

Published Friday, June 06, 2008 3:21 PM by michmon

转载于:https://www.cnblogs.com/zihui69/archive/2008/11/18/1336280.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值