XSLT – Data View wp- Unable to display this Web Part (only for any other user other than yourself.)

I got the following error when developing my web part and having my manager log in to check the page. But the page worked fine for me, and was not checked out, as I was not using Publishing Features.

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

The page would load fine for me in browser. In SharePoint Designer, I would have an older data set in my data view web part. I would break the web part when I did a Refresh Data Source, so I left it as it was. I had enough data to continue building out my template.

Once I had my manager review my work on his computer, the page gave him the error Unable to display this Web Part. So, I logged in as myself (To make sure the old template was not cached on my computer) and it worked for my user.

The Solution

Follow-up: This is not a solution, but a work around. Upon Re-saving the page in SPD, the error occurred once again. See future post on 10/15/09 about XSLT layouts and why they break your data view web part.

At one point, I did have the page checked out, but it seem to automatically disguard it when I tried to check it back in. Really weird, so I made a copy of the Default.aspx page that contained my web part. I right clicked the copy and said Reset to Site Definition.

I noticed the web part was still on the page. I guess since web parts don’t support versioning, resetting the page only resets the code around web part zones. My web part was still on the copy. I suspected that if I reset the page and that it just might work now. I logged in as another user and it worked.

Here are the steps:

  1. Make a copy of the ASPX page containing your “Broken” web part
  2. Reset the COPY to Site Definition
  3. Try the newly reset page and see if it works for your users.

Summary

I have noticed a lot of XSLT web part errors. I am starting to log them in one place as an archive of solutions, rather than abandoning my web part and starting over each time I get an error.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s