SharePoint Designer Support Team Blog

Providing insight on hot and common issues, supportability, and how-to's for Microsoft SharePoint Designer. Coming direct from the support engineers themselves. Read who we are.

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

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

 

Ahmed Atia said:

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.

August 3, 2008 1:21 PM
 

Suzanne said:

"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 :(

December 4, 2008 9:18 AM
 

Suzanne said:

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.

December 4, 2008 9:26 AM
 

naresh said:

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. naresh

February 19, 2009 11:34 AM
 

Mike said:

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.  

March 10, 2009 11:56 AM
 

michmon said:

@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.aspx

March 10, 2009 12:02 PM
 

Smithl said:

I've found this issue can also be caused when a view or table column has a space in it.

October 20, 2009 12:17 PM

Leave a Comment

(required) 
(optional)
(required) 

  
Enter Code Here: Required
Submit

© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Microsoft
Page view tracker