I used SharePoint Designer 2007 to create a joined view of two lists and changed the 'ListID' parameters to 'ListName'. The list is grouped and sorted. Update: When the joined subview is in the header, it works without any issues in dev but in production I get the following 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.

Other web parts using single list DVWPs on the same data sources display correctly. SharePoint Designer has been disabled on production. Anyone have any clues on how to go about troubleshooting this error or what might be wrong?

Update: I was able to isolate the error to calling the joined subview template inside the header (grouped) row. When I remove the template call (<xsl:call-template name="BM_Activity" />) from the code, the web part displays (although without the necessary table) correctly in production.

Here is some sample code that replicates the error:

<xsl:template name="BM_Study.groupheader0">
    <xsl:param name="fieldtitle" />
    <xsl:param name="fieldname" />
    <xsl:param name="fieldvalue" />
    <xsl:param name="fieldtype" />
    <xsl:param name="nodeset" />
    <xsl:param name="groupid" />
    <xsl:param name="displaystyle" />
    <xsl:param name="imagesrc" />
    <xsl:param name="alttext" />
    <xsl:param name="altname" />
    <xsl:param name="hidedetail" />
    <xsl:param name="showheader" />
    <xsl:param name="showheadercolumn" />
    <xsl:if test="$showheader" ddwrt:cf_ignore="1">
        <tr id="group{$groupid}" style="display:{$displaystyle}">
            <td class="ms-gb" style="background:#cccccc;" colspan="99">
                    <xsl:when test="$groupid='0' or $groupid='9'">
                    <xsl:when test="$groupid='1'">
                        <xsl:text disable-output-escaping="yes" ddwrt:nbsp-preserve="yes">&amp;nbsp;</xsl:text>
                    <xsl:when test="$groupid='2'">
                        <xsl:text disable-output-escaping="yes" ddwrt:nbsp-preserve="yes">&amp;nbsp;</xsl:text>
                        <xsl:text disable-output-escaping="yes" ddwrt:nbsp-preserve="yes">&amp;nbsp;</xsl:text>
                        <xsl:text disable-output-escaping="yes" ddwrt:nbsp-preserve="yes">&amp;nbsp;</xsl:text>
                        <xsl:text disable-output-escaping="yes" ddwrt:nbsp-preserve="yes">&amp;nbsp;</xsl:text>
                        <xsl:text disable-output-escaping="yes" ddwrt:nbsp-preserve="yes">&amp;nbsp;</xsl:text>
                <xsl:if test="not($hidedetail)" ddwrt:cf_ignore="1">
                    <a href="javascript:" onclick="javascript:ExpGroupBy(this);return false;">
                        <img src="{$imagesrc}" border="0" alt="{$alttext}" name="{$altname}" /></a>
                <xsl:text disable-output-escaping="yes" ddwrt:nbsp-preserve="yes" xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime">&amp;nbsp;</xsl:text>
                    <xsl:value-of select="$fieldtitle" />
                <xsl:if test="$fieldtitle">: </xsl:if>
                    <xsl:when test="$fieldtype='url'">
                        <a href="{$fieldvalue}">
                            <xsl:value-of select="$fieldvalue" />
                    <xsl:when test="$fieldtype='user'">
                        <xsl:value-of select="$fieldvalue" disable-output-escaping="yes" />
                        <xsl:value-of select="$fieldvalue" />
                <xsl:call-template name="BM_Activity" />
<xsl:variable name="BM_Activity_automode">0</xsl:variable>
<xsl:template name="BM_Activity">
    <xsl:variable name="dvt_StyleName">Table</xsl:variable>
    <xsl:variable name="dvt_ParentRow" select="current()" />
    <xsl:variable name="Rows" select="/dsQueryResponse/Dev_Sci_Biomarker_Activity/Rows/Row[@Study_x0020_ID=$dvt_ParentRow/@Title]" />
    <table border="0" width="100%" cellpadding="2" cellspacing="0">
        <tr valign="top">
            <xsl:if test="$BM_Activity_automode = '1'" ddwrt:cf_ignore="1">
                <th class="ms-vh" width="1%" nowrap="nowrap"></th>
            <th class="ms-vh" nowrap="" style="height: 19px">Study ID</th>
        <xsl:call-template name="BM_Activity.body">
            <xsl:with-param name="Rows" select="$Rows" />
            <xsl:with-param name="dvt_ParentRow" select="$dvt_ParentRow" />
<xsl:template name="BM_Activity.body">
    <xsl:param name="Rows" />
    <xsl:param name="dvt_ParentRow" />
    <xsl:for-each select="$Rows">
        <xsl:call-template name="BM_Activity.rowview" />
<xsl:template name="BM_Activity.rowview">
        <xsl:if test="$BM_Activity_automode = '1'" ddwrt:cf_ignore="1">
            <td class="ms-vb" width="1%" nowrap="nowrap">
                <span ddwrt:amkeyfield="ID" ddwrt:amkeyvalue="ddwrt:EscapeDelims(string(@ID))" ddwrt:ammode="view"></span>
        <td class="ms-vb">
            <xsl:value-of select="@Study_x0020_ID" />

Check to make sure the list structures in dev and prod match. Also make sure that the original list GUID(s) aren't anywhere else in the DVWP code.

Not being able to use SPD in prod is going to make this tough to debug, frankly.

// UPDATE //

One thing I would try is changing the lines where the Rows variables are defined to use this syntax:

<xsl:variable name="Rows" select="/dsQueryResponse/Dev_Sci_Biomarker_Activity/Rows/Row"/>

as in, converting:

<xsl:variable name="Rows" select="../../../Dev_Sci_Biomarker_Studies/Rows/Row[@Title=$dvt_ParentRow/@Study_x0020_ID]" />


<xsl:variable name="Rows" select="/dsQueryResponse/Dev_Sci_Biomarker_Studies/Rows/Row[@Title=$dvt_ParentRow/@Study_x0020_ID]" />   

That relative addressing into the XML may cause a problem.

I usually just write my own XSL so that I'm sure what I've got; I see a lot of the cruft SPD generates in what you're using.

  • I went through the DVWP code and there are no outstanding GUIDs. Made the lists into templates and moved them over to production; the other DVWPs display correctly in production while accessing the same aggregate data source! The only difference (that I can see) between the DVWPs that display correctly and the ones that do not, is that the ones that work only show a view from one list (they are drop-down menus). So I changed the layout to a table and it still worked. I am guessing the issue lies in trying to show a view of multiple joined lists from a DVWP created in a different environment. – 121315 Apr 5 '12 at 23:39
  • It's going to be really hard to debug this without opening the DVWP in the same environment with SharePoint Designer. There has to be something different between the two environments that's causing the issue, as I've gone through the steps you outline many times myself. If the same DataSources exist, then the DVWP should work in both places. See my update above for one thing you could try. – Marc D Anderson Apr 7 '12 at 16:40
  • Thanks Marc! I am learning a lot from your comments. Sorry for all the cruft, I am just now learning xsl and rely too much on SharePoint. BTW, all of your blog posts/articles are a great resource. I am able to get the web part to display in production with joined subviews but not when the subview is part of a grouped header row. Removing the template call allows the template to display, but it also removes the intended view of the information. See my updated question above. Thank you for giving this stab. :-) – 121315 Apr 9 '12 at 21:46
  • Figured it out. I should have check more closely that the lists were identical in both environments. One of the links using the lookup column was broken in production, hence the error. – 121315 Jul 6 '12 at 12:39
  • Grr. Those things always trip us up, don't they? This is one of the potential drawbacks of "middle tier" development, but one that is usually overridden by the benefits. p.s. "Check to make sure the list structures in dev and prod match" was my first suggestion! – Marc D Anderson Jul 6 '12 at 16:29

Figured it out. The DVWP was not displaying because there were several lists that were "linked" to each other via the "Lookup (information already on this site)" column. Some of the lists that existed both in development and production carried the link without an issue but lists that I created first in development and linked to each other then migrated to production did not maintain their link. Indeed, what I was isolating in the DVWP was the list that had the broken connection and there was nothing actually wrong with the DVWP itself.

Long story short, if migrating lists from one environment to another check if the "Lookup" column maintains the link; most likely it will be broken.

Once I fixed cleaned up/updated the "Lookup" column in production, the DVWP worked without any issues.

Thanks to Marc Anderson for plugin away at possible problems/solutions. You were right, the same data sources did not exist in both environment since in production the "Lookup" column was no longer linked as it was in development.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.