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:
- Start SharePoint Designer, and open page containing broken data view(s).
- In SharePoint Designer's menu, click Task Panes -> Data Source Library.
- 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.
- 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.
- 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).
- Remove the newly inserted data view.
- 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.
- Once you find the ListName property, copy everything in between { ... } (without the braces).
- 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.
- 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.
Comments
Anonymous
August 03, 2008
First of all, I'm using WSS 3.0. Actually, I face this error alot, I don't the reason. When I read this article, I followed the above steps, but the problem is still exists. I hacked the page's code using SharePoint designer, and I found that the problem is in "DataSource", that the web part uses, whan I remove it, I have no error, but ofcourse. there is no date. So, there is a problem in the "DataSource, how can I overcome this problem.Anonymous
December 04, 2008
"Highlight the broken data view, and go into split view (half code, half design). From the code portion highlighted, look for the ListName Property" Well when I get to this step my data views don't have a listname property so it seems this fix won't work :(Anonymous
December 04, 2008
However, I did manage to fix it. Following the same steps as above except instead of looking at "listname" I copied "listid" and replaced it in the old webpart. Now it works.Anonymous
February 19, 2009
Hi, I am struggling in displaying the "showdata" after passing the queryex to the search webservice in sharepoint designer .I am getting the following 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" i searched many threds,could not find any solution. please respond MVP's and geeks. i can retrieve the results using the tool http://www.mosssearch.com/searchwebservice.html provided by Shankar's musings article http://techdhaan.wordpress.com/2008/06/03/moss-2007-employee-directory-web-part-using-search-and-data-view-web-parts/ here is my queryEx: <QueryPacket xmlns="urn:Microsoft.Search.Query"> <Query><SupportedFormats><Format>urn:Microsoft.Search.Response.Document:Document</Format></SupportedFormats><Context> <QueryText type="MSSQLFT" language="en-us">select preferredname,Title, Path, Description, Write, Rank,Size from scope() where "scope" = 'people' order by preferredname ASC</QueryText></Context><Range><StartAt>1</StartAt><Count>100</Count></Range><EnableStemming>true</EnableStemming><TrimDuplicates>true</TrimDuplicates><IgnoreAllNoiseQuery>true</IgnoreAllNoiseQuery><ImplicitAndBehavior>true</ImplicitAndBehavior><IncludeRelevanceResults>true</IncludeRelevanceResults><IncludeSpecialTermResults>true</IncludeSpecialTermResults><IncludeHighConfidenceResults>true</IncludeHighConfidenceResults></Query></QueryPacket> and i also can see the result query by using this code in visual studio webreference program.. this is the program i used for debugging: class Program { static void Main(string[] args) { sharepointdev.QueryService qs = new ConsoleApplication2.sharepointdev.QueryService(); qs.PreAuthenticate = false; qs.Credentials = System.Net.CredentialCache.DefaultCredentials; DataSet ds = new DataSet(); //string ds; ds = qs.QueryEx(@"<QueryPacket xmlns=""urn:Microsoft.Search.Query""> <Query><SupportedFormats><Format>urn:Microsoft.Search.Response.Document:Document</Format></SupportedFormats><Context> <QueryText type=""MSSQLFT"" language=""en-us"">select preferredname,Title, Path, Description, Write, Rank,Size from scope() where ""scope"" = 'people' order by preferredname ASC</QueryText></Context><Range><StartAt>1</StartAt><Count>1000</Count></Range><EnableStemming>true</EnableStemming><TrimDuplicates>true</TrimDuplicates><IgnoreAllNoiseQuery>true</IgnoreAllNoiseQuery><ImplicitAndBehavior>true</ImplicitAndBehavior><IncludeRelevanceResults>true</IncludeRelevanceResults><IncludeSpecialTermResults>true</IncludeSpecialTermResults><IncludeHighConfidenceResults>true</IncludeHighConfidenceResults></Query></QueryPacket>"); } } I have also checked the query by directly passing it to queryex method in query service. http://sharepointdev/_vti_bin/search.asmx?op=QueryEx and I do get the result set. all i need is to get the result set once i clik on show data in sharepoint designer. have followed this article(http://techdhaan.wordpress.com/2008/06/03/moss-2007-employee-directory-web-part-using-search-and-data-view-web-parts/) and can not see the result after repated trails in every possible way. seems like problem is with the sharepoint designer. I have even tried with the sharepoint support link: http://support.microsoft.com/kb/923173 but has no luck any suggestions or help is much much appreciated.... can somebody please help me. nareshAnonymous
March 10, 2009
Naresh - we are seeing the exact same issue here too. So far I haven't found a solution and it does appear that the dataview webpart is failing for some reason.Anonymous
March 10, 2009
@Mike and @Naresh: have you seen this blog post on ways to get around using CAML queries in a SOAPDataSource? http://blogs.msdn.com/sharepointdesigner/archive/2008/06/20/data-source-issues-and-workarounds.aspxAnonymous
October 20, 2009
I've found this issue can also be caused when a view or table column has a space in it.Anonymous
February 01, 2010
We have faced this issue many times but are unable to figure out the exact reason. We use ItemStyle.xsl and ContentQueryMain.xsl for the look and feel of the webparts. The funny part is the webparts work perfectly fine for the admin folks but not for the rest. Could anyone suggest a solution.Anonymous
February 02, 2010
@Deepa: that actually sounds more like a permissions problem. After making alterations to the *.XSL files you should ensure they are checked in with an approved major version. Checking the SharePoint ULS logs would also be helpful in this case. -MikeAnonymous
February 08, 2010
@Mike: Thanks for the response. Both the .xls were checked in as approved versions but i still had the problem. Managed to solve it recently by adding the group NT AUTHORITYauthenticated users with read permission in Documents Library. Hope this solution helps anyone else if they have had a similar problem.Anonymous
September 09, 2010
@michmon, You said, "Highlight the broken data view, and go into split view (half code, half design)." I did not see any data view on my page except the one I newly pasted. Any suggestion? Thanks. @Suzanne You mentioned that you copied "listid" and replaced it in the old webpart. I didnt see ListID on my AllItems.aspx page, although there is an <ID> tag. Is this what you copied? Thanks for your help.Anonymous
September 29, 2010
@AfriBuilder I doupt @suzanne will respond to you since the post was in 2008. I found the listid in the dispform.aspx...where my error was and is seems to have correct the error partially. Now instead of an error, it tells me I have 'nobody registered' but I registered myself~! hope it helps a bit.Anonymous
January 05, 2011
It's microsoft technology, so the solution is to completely reinstall all server and client machines and it might work in the future. It's normal for files to get corrupted for no reason at all. It must be the user's fault.Anonymous
January 23, 2011
To resolve this issue please follow the steps given at below location vimleshtiwari.blogspot.com/.../server-returned-non-specific-error-when.html I hope it resolves the issue.Anonymous
April 06, 2011
I am facing a similar issue, whenever I create a new Edit Item form, I get an error like this one: "Unable to display this Web Part. To troubleshoot the problem, open this Web page in a Microsoft SharePoint Foundation-compatible HTML editor such as Microsoft SharePoint Designer. If the problem persists, contact your Web server administrator. Correlation ID:f9f21563-ed07-41bb-8b49-f37b06c3ad08 " I am not even editing anything in the form, just creating it. I saw the Listname and Listid tage, they are same as the List unique ID. Help needed.Anonymous
September 22, 2011
Thank you dear friend. This article helped us fix our company helpdesk application pages that is based on SharePoint.Anonymous
February 07, 2012
By adding "NT AUTHORITYauthenticated users" and giving them read only permission worked for me. Thanks Deepa.Anonymous
July 21, 2013
Same problem occured to me. Please help me. Unable to display this Web Part. To troubleshoot the problem, open this Web page in a Microsoft SharePoint Foundation-compatible HTML editor such as Microsoft SharePoint Designer. If the problem persists, contact your Web server administrator. Correlation ID:e8803a38-0a6e-46a9-a6fd-77f07f27e414 Same listview item but still error persists.Anonymous
July 25, 2013
This might do the job ittechnotebook.blogspot.com/.../all-data-view-web-parts-stopped-working.htmlAnonymous
August 13, 2013
Any suggestions for when the server is running Windows 2003 SP2?Anonymous
August 28, 2013
We are getting the same problem ("Unable to display this Web Part..."). However, after refreshing the page a few times (4+) it will finally display the data.Anonymous
January 12, 2015
Thanks for this article. It worked for me by replacing ListID values as posted by Suzanne.Anonymous
July 14, 2015
I kept getting this error on custom list forms. Did not matter if the forms were display/new/edit. It seemed that, each time I changed the view on the list somehow (added a column, changed default view, etc.), my form broke. I tried updating the ListName. Didn't work. Closed and did not save changed. Tried updating the ListID. Didn't work. Closed and did not save changed. Form still broken. :( Here is what I did:
- Open the broken form in SP Designer 2010
- Go to View--> Task Pane --> Data Source. Your data source should be greyed out. SPD cannot find the data source!
- Create a new, custom Edit form.
- On the new form, change to Split code/design view.
- Put your cursor in the code view. Go to Edit --> Find. Search for WebURL and copy that into Notepad.
- Go back to the broken form.
- On the broken form, change to Split code/design view.
- Search for WebURL. Copy into Notepad. OMG - both of the URLs were exactly the same, except the broken form's URL was all in lowercase! Really?!?
- Go back and copy the WebURL with the correct case (from the new form).
- Go to your broken form.
- Go to Edit --> Find. Find WebURL and then click FindAll. Replace every instance of WebURL with the URL from non-broken form that has the correct case. After the final edit, your form should "come back" to you. You don't have to click Save or Refresh to see it, but be sure to save your changes!