Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I'm having a strange issue with DFWP when I try to display content from site collection root.

Site/subsite structure of the site collection is like this: ROOT --> LEVEL 1 --> LEVEL 2

On my LEVEL 2 site I have bunch of DFWPs. The ones that are working nicely are showing items from a custom list from LEVEL 1 site.

Then I tried to do the same with another DFWP, but this time the source list is a OOB Discussion list at the site collection ROOT site.

For some unknown reason I keep getting error "List does not exist. The page you selected contains a list that does not exist. It may have been deleted by another user."

Below you can find the working DFWP and the one that is not working. To me they look identical, except of course about what list/web is used and what fields are displayed.

I've tried to use "/" and "{sitecollectionroot}" as the WebURL, and in SPD I can see items in both cases. The only difference between the two WebURLs is that with {sitecollectionroot} I cannot select the Query fields using GUI in SPD (clicking Fields button does nothing).

EDIT: If I have the OOB Discussion list on LEVEL 1 instead of ROOT, my DFWP works fine. I shall use this as a workaround.

Could anyone be so kind and point me what could be causing this behaviour. Thank you!

Working:

<WebPartPages:DataFormWebPart runat="server" Description="" ListDisplayName="" ImportErrorMessage="T&#228;t&#228; WWW-osaa ei voi tuoda." PartOrder="2" HelpLink="" AllowRemove="True" IsVisible="True" AllowHide="True" UseSQLDataSourcePaging="True" ExportControlledProperties="True" DataSourceID="" Title="Asiakkaan yhteyshenkil&#246;t" ViewFlag="8" NoDefaultStyle="TRUE" AllowConnect="True" FrameState="Normal" PageSize="-1" PartImageLarge="" AsyncRefresh="False" ExportMode="All" Dir="Default" DetailLink="" ShowWithSampleData="False" FrameType="TitleBarOnly" PartImageSmall="" IsIncluded="True" SuppressWebPartChrome="False" AllowEdit="True" ManualRefresh="False" ChromeType="TitleOnly" AutoRefresh="False" AutoRefreshInterval="60" AllowMinimize="True" ViewContentTypeId="" InitialAsyncDataFetch="True" MissingAssembly="T&#228;t&#228; WWW-osaa ei voi tuoda." HelpMode="Modeless" ID="g_89239d35_a594_424b_a4ba_4e98758a4bd9" ConnectionID="00000000-0000-0000-0000-000000000000" AllowZoneChange="True" IsIncludedFilter="" __MarkupType="vsattributemarkup" __WebPartId="{89239D35-A594-424B-A4BA-4E98758A4BD9}" __AllowXSLTEditing="true" WebPart="true" Height="" Width="">
  <ParameterBindings>
    <ParameterBinding Name="dvt_apos" Location="Postback;Connection"/>
    <ParameterBinding Name="ManualRefresh" Location="WPProperty[ManualRefresh]"/>
    <ParameterBinding Name="UserID" Location="CAMLVariable" DefaultValue="CurrentUserName"/>
    <ParameterBinding Name="Today" Location="CAMLVariable" DefaultValue="CurrentDate"/>
  </ParameterBindings>
  <DataFields>@Asiakas,Asiakas;@MC_x003A_n_x0020_yhteyshenkil_x0,MC:n yhteyshenkilö;@Yhteyshenkil_x00f6_n_x0020_tyypp,Yhteyshenkilön tyyppi;@Title,Last Name;@FirstName,First Name;@FullName,Full Name;@Email,E-mail Address;@Company,Company;@JobTitle,Job Title;@WorkPhone,Business Phone;@HomePhone,Home Phone;@CellPhone,Mobile Number;@WorkFax,Fax Number;@WorkAddress,Address;@WorkCity,City;@WorkState,State/Province;@WorkZip,ZIP/Postal Code;@WorkCountry,Country/Region;@WebPage,Web Page;@Comments,Notes;@ID,ID;@ContentType,Content Type;@Modified,Modified;@Created,Created;@Author,Created By;@Editor,Modified By;@_UIVersionString,Version;@Attachments,Attachments;@File_x0020_Type,File Type;@FileLeafRef,Name (for use in forms);@FileDirRef,Path;@FSObjType,Item Type;@_HasCopyDestinations,Has Copy Destinations;@_CopySource,Copy Source;@ContentTypeId,Content Type ID;@_ModerationStatus,Approval Status;@_UIVersion,UI Version;@Created_x0020_Date,Created;@FileRef,URL Path;@ItemChildCount,Item Child Count;@FolderChildCount,Folder Child Count;</DataFields>
  <Xsl>
    <xsl:stylesheet xmlns:x="http://www.w3.org/2001/XMLSchema" xmlns:d="http://schemas.microsoft.com/sharepoint/dsp" version="1.0" exclude-result-prefixes="xsl msxsl ddwrt" xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime" xmlns:asp="http://schemas.microsoft.com/ASPNET/20" xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:SharePoint="Microsoft.SharePoint.WebControls" xmlns:ddwrt2="urn:frontpage:internal">
      <xsl:output method="html" indent="no"/>
      <xsl:decimal-format NaN=""/>
      <xsl:param name="dvt_apos">&apos;</xsl:param>
      <xsl:param name="ManualRefresh"></xsl:param>
      <xsl:variable name="dvt_1_automode">0</xsl:variable>

      <xsl:template match="/" xmlns:x="http://www.w3.org/2001/XMLSchema" xmlns:d="http://schemas.microsoft.com/sharepoint/dsp" xmlns:asp="http://schemas.microsoft.com/ASPNET/20" xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer" xmlns:SharePoint="Microsoft.SharePoint.WebControls">
        <xsl:choose>
          <xsl:when test="($ManualRefresh = 'True')">
            <table width="100%" border="0" cellpadding="0" cellspacing="0">
              <tr>
                <td valign="top">
                  <xsl:call-template name="dvt_1"/>
                </td>
                <td width="1%" class="ms-vb" valign="top">
                  <img src="/_layouts/images/staticrefresh.gif" id="ManualRefresh" border="0" onclick="javascript: {ddwrt:GenFireServerEvent('__cancel')}" alt="Click here to refresh the dataview."/>
                </td>
              </tr>
            </table>
          </xsl:when>
          <xsl:otherwise>
            <xsl:call-template name="dvt_1"/>
          </xsl:otherwise>
        </xsl:choose>
      </xsl:template>

      <xsl:template name="dvt_1">
        <xsl:variable name="dvt_StyleName">Table</xsl:variable>
        <xsl:variable name="Rows" select="/dsQueryResponse/Rows/Row"/>
        <xsl:variable name="dvt_RowCount" select="count($Rows)"/>

        <xsl:variable name="dvt_IsEmpty" select="$dvt_RowCount = 0"/>
        <xsl:choose>
          <xsl:when test="$dvt_IsEmpty">
            <xsl:call-template name="dvt_1.empty"/>
          </xsl:when>
          <xsl:otherwise>
            <table border="0" width="100%" cellpadding="2" cellspacing="0">
              <tr valign="top">
                <xsl:if test="$dvt_1_automode = '1'" ddwrt:cf_ignore="1">
                  <th class="ms-vh" width="1%" nowrap="nowrap"></th>
                </xsl:if>
                <th class="ms-vh" nowrap="nowrap">Sukunimi</th>
                <th class="ms-vh" nowrap="nowrap">Etunimi</th>
                <th class="ms-vh" nowrap="nowrap">Yhteyshenkilön tyyppi</th>
                <th class="ms-vh" nowrap="nowrap">Titteli</th>
                <th class="ms-vh" nowrap="nowrap">Sähköposti</th>
                <th class="ms-vh" nowrap="nowrap">Puhelin</th>
              </tr>
              <xsl:call-template name="dvt_1.body">
                <xsl:with-param name="Rows" select="$Rows"/>
              </xsl:call-template>
            </table>
          </xsl:otherwise>
        </xsl:choose>
      </xsl:template>
      <xsl:template name="dvt_1.body">
        <xsl:param name="Rows"/>
        <xsl:for-each select="$Rows">
          <xsl:call-template name="dvt_1.rowview" />
        </xsl:for-each>
      </xsl:template>
      <xsl:template name="dvt_1.rowview">
        <tr>
          <xsl:if test="position() mod 2 = 1">
            <xsl:attribute name="class">ms-alternating</xsl:attribute>
          </xsl:if>
          <xsl:if test="$dvt_1_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>
          </xsl:if>
          <td class="ms-vb">
            <a href="/asiakkaat/Lists/Yhteyshenkilt/DispForm.aspx?ID={string(@ID)}">
              <xsl:value-of select="@LinkTitle" />
            </a>
          </td>
          <td class="ms-vb">
            <xsl:value-of select="@FirstName"/>
          </td>
          <td class="ms-vb">
            <xsl:value-of select="@Yhteyshenkil_x00f6_n_x0020_tyypp"/>
          </td>
          <td class="ms-vb">
            <xsl:value-of select="@JobTitle"/>
          </td>
          <td class="ms-vb">
            <a href="mailto:{@Email}">
              <xsl:value-of select="@Email"/>
            </a>
          </td>
          <td class="ms-vb">
            <xsl:value-of select="@WorkPhone"/>
          </td>
        </tr>
      </xsl:template>
      <xsl:template name="dvt_1.empty">
        <xsl:variable name="dvt_ViewEmptyText">There are no items to show in this view.</xsl:variable>
        <table border="0" width="100%">
          <tr>
            <td class="ms-vb">
              <xsl:value-of select="$dvt_ViewEmptyText"/>
            </td>
          </tr>
        </table>
      </xsl:template>
    </xsl:stylesheet>
  </Xsl>
  <DataSources>
    <SharePointWebControls:SPDataSource runat="server" DataSourceMode="List" SelectCommand="&lt;View&gt;&lt;Query/&gt;&lt;ViewFields&gt;&lt;FieldRef Name=&quot;Asiakas&quot;/&gt;&lt;FieldRef Name=&quot;WorkPhone&quot;/&gt;&lt;FieldRef Name=&quot;Email&quot;/&gt;&lt;FieldRef Name=&quot;FirstName&quot;/&gt;&lt;FieldRef Name=&quot;LinkTitle&quot;/&gt;&lt;FieldRef Name=&quot;Yhteyshenkil_x00f6_n_x0020_tyypp&quot;/&gt;&lt;FieldRef Name=&quot;JobTitle&quot;/&gt;&lt;FieldRef Name=&quot;PermMask&quot;/&gt;&lt;FieldRef Name=&quot;MC_x003A_n_x0020_yhteyshenkil_x0&quot;/&gt;&lt;FieldRef Name=&quot;ID&quot;/&gt;&lt;/ViewFields&gt;&lt;/View&gt;" UseInternalName="True" UseServerDataFormat="True" ID="dsYhteyshenkilot1">
      <SelectParameters>
        <WebPartPages:DataFormParameter ParameterKey="ListId" PropertyName="ParameterValues" DefaultValue="D5D5A002-4D78-47CA-A051-C84559C09E42" Name="ListId"></WebPartPages:DataFormParameter>
        <WebPartPages:DataFormParameter ParameterKey="WebURL" PropertyName="ParameterValues" DefaultValue="/asiakkaat/" Name="WebURL"></WebPartPages:DataFormParameter>
      </SelectParameters>
    </SharePointWebControls:SPDataSource>
  </DataSources>
</WebPartPages:DataFormWebPart>

Not working:

<WebPartPages:DataFormWebPart runat="server" Description="" PartOrder="2" HelpLink="" AllowRemove="True" IsVisible="True" AllowHide="True" UseSQLDataSourcePaging="True" ExportControlledProperties="True" Title="Asiakkaaseen liityv&#228;t keskustelut" ViewFlag="8" NoDefaultStyle="TRUE" AllowConnect="True" FrameState="Normal" PartImageLarge="" AsyncRefresh="True" ExportMode="All" Dir="Default" DetailLink="" ShowWithSampleData="False" FrameType="TitleBarOnly" PartImageSmall="" IsIncluded="True" SuppressWebPartChrome="False" AllowEdit="True" ManualRefresh="False" ChromeType="TitleOnly" AutoRefresh="False" AutoRefreshInterval="60" AllowMinimize="True" ViewContentTypeId="" InitialAsyncDataFetch="False" MissingAssembly="Cannot import this Web Part." HelpMode="Modeless" ListUrl="" ID="g_e4b21bca_639a_4af6_885c_eb6c14c03001" ConnectionID="00000000-0000-0000-0000-000000000000" AllowZoneChange="True" IsIncludedFilter="" __MarkupType="vsattributemarkup" __WebPartId="{E4B21BCA-639A-4AF6-885C-EB6C14C03001}" __AllowXSLTEditing="true" WebPart="true" Height="" Width="">
  <ParameterBindings>
    <ParameterBinding Name="dvt_apos" Location="Postback;Connection"/>
    <ParameterBinding Name="ManualRefresh" Location="WPProperty[ManualRefresh]"/>
    <ParameterBinding Name="UserID" Location="CAMLVariable" DefaultValue="CurrentUserName"/>
    <ParameterBinding Name="Today" Location="CAMLVariable" DefaultValue="CurrentDate"/>
  </ParameterBindings>
  <DataFields>@Title,Subject;@Body,Body;@MyEditor,Modified By (picture and name);@DiscussionLastUpdated,Last Updated;@EmailSender,E-Mail Sender;@Asiakas,Asiakas;@Tuote,Tuote;@ID,ID;@ContentType,Content Type;@Modified,Modified;@Created,Created;@Author,Created By;@Editor,Modified By;@_UIVersionString,Version;@Attachments,Attachments;@File_x0020_Type,File Type;@FileLeafRef,Name (for use in forms);@FileDirRef,Path;@FSObjType,Item Type;@_HasCopyDestinations,Has Copy Destinations;@_CopySource,Copy Source;@ContentTypeId,Content Type ID;@_ModerationStatus,Approval Status;@_UIVersion,UI Version;@Created_x0020_Date,Created;@FileRef,URL Path;@ItemChildCount,Replies;@FolderChildCount,Folder Child Count;@DiscussionTitleLookup,Discussion Title;@ThreadIndex,Thread Index;@ParentFolderId,Parent Folder Id;@GUID,GUID;@MessageId,Message ID;@TrimmedBody,Trimmed Body;@ShortestThreadIndexId,Shortest Thread-Index Id;@ShortestThreadIndexIdLookup,Shortest Thread-Index Id Lookup;</DataFields>
  <Xsl>
    <xsl:stylesheet xmlns:x="http://www.w3.org/2001/XMLSchema" xmlns:d="http://schemas.microsoft.com/sharepoint/dsp" version="1.0" exclude-result-prefixes="xsl msxsl ddwrt" xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime" xmlns:asp="http://schemas.microsoft.com/ASPNET/20" xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:SharePoint="Microsoft.SharePoint.WebControls" xmlns:ddwrt2="urn:frontpage:internal">
      <xsl:output method="html" indent="no"/>
      <xsl:decimal-format NaN=""/>
      <xsl:param name="dvt_apos">&apos;</xsl:param>
      <xsl:param name="ManualRefresh"></xsl:param>
      <xsl:variable name="dvt_1_automode">0</xsl:variable>

      <xsl:template match="/" xmlns:x="http://www.w3.org/2001/XMLSchema" xmlns:d="http://schemas.microsoft.com/sharepoint/dsp" xmlns:asp="http://schemas.microsoft.com/ASPNET/20" xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer" xmlns:SharePoint="Microsoft.SharePoint.WebControls">
        <xsl:choose>
          <xsl:when test="($ManualRefresh = 'True')">
            <table width="100%" border="0" cellpadding="0" cellspacing="0">
              <tr>
                <td valign="top">
                  <xsl:call-template name="dvt_1"/>
                </td>
                <td width="1%" class="ms-vb" valign="top">
                  <img src="/_layouts/images/staticrefresh.gif" id="ManualRefresh" border="0" onclick="javascript: {ddwrt:GenFireServerEvent('__cancel')}" alt="Click here to refresh the dataview."/>
                </td>
              </tr>
            </table>
          </xsl:when>
          <xsl:otherwise>
            <xsl:call-template name="dvt_1"/>
          </xsl:otherwise>
        </xsl:choose>
      </xsl:template>

      <xsl:template name="dvt_1">
        <xsl:variable name="dvt_StyleName">Table</xsl:variable>
        <xsl:variable name="Rows" select="/dsQueryResponse/Rows/Row"/>
        <xsl:variable name="dvt_RowCount" select="count($Rows)"/>
        <xsl:variable name="IsEmpty" select="$dvt_RowCount = 0" />
        <xsl:variable name="dvt_IsEmpty" select="$dvt_RowCount = 0"/>
        <xsl:choose>
          <xsl:when test="$dvt_IsEmpty">
            <xsl:call-template name="dvt_1.empty"/>
          </xsl:when>
          <xsl:otherwise>
            <table border="0" width="100%" cellpadding="2" cellspacing="0">
              <tr valign="top">
                <xsl:if test="$dvt_1_automode = '1'" ddwrt:cf_ignore="1">
                  <th class="ms-vh" width="1%" nowrap="nowrap"></th>
                </xsl:if>
                <th class="ms-vh" nowrap="nowrap">Otsikko</th>
                <th class="ms-vh" nowrap="nowrap">Viestejä</th>
                <th class="ms-vh" nowrap="nowrap">Viimeisin viesti</th>
              </tr>
              <xsl:call-template name="dvt_1.body">
                <xsl:with-param name="Rows" select="$Rows"/>
              </xsl:call-template>
            </table>
          </xsl:otherwise>
        </xsl:choose>
      </xsl:template>
      <xsl:template name="dvt_1.body">
        <xsl:param name="Rows"/>
        <xsl:for-each select="$Rows">
          <xsl:call-template name="dvt_1.rowview" />
        </xsl:for-each>
      </xsl:template>
      <xsl:template name="dvt_1.rowview">
        <tr>
          <xsl:if test="position() mod 2 = 1">
            <xsl:attribute name="class">ms-alternating</xsl:attribute>
          </xsl:if>
          <xsl:if test="$dvt_1_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>
          </xsl:if>
          <td class="ms-vb">
            <a href="/Lists/Keskustelut/DispForm.aspx?ID={@ID}">
              <xsl:value-of select="@LinkDiscussionTitleNoMenu" />
            </a>
          </td>
          <td class="ms-vb">
            <xsl:value-of select="@ItemChildCount"/>
          </td>
          <td class="ms-vb">
            <xsl:value-of select="@DiscussionLastUpdated"/>
          </td>
        </tr>
      </xsl:template>
      <xsl:template name="dvt_1.empty">
        <xsl:variable name="dvt_ViewEmptyText">There are no items to show in this view.</xsl:variable>
        <table border="0" width="100%">
          <tr>
            <td class="ms-vb">
              <xsl:value-of select="$dvt_ViewEmptyText"/>
            </td>
          </tr>
        </table>
      </xsl:template>
    </xsl:stylesheet>
  </Xsl>
  <DataSources>
    <SharePointWebControls:SPDataSource runat="server" DataSourceMode="List" SelectCommand="&lt;View&gt;&lt;Query&gt;&lt;OrderBy&gt;&lt;FieldRef Name=&quot;DiscussionLastUpdated&quot; Ascending=&quot;FALSE&quot;/&gt;&lt;/OrderBy&gt;&lt;/Query&gt;&lt;ViewFields&gt;&lt;FieldRef Name=&quot;ID&quot;/&gt;&lt;FieldRef Name=&quot;Asiakas&quot;/&gt;&lt;FieldRef Name=&quot;LinkDiscussionTitleNoMenu&quot;/&gt;&lt;FieldRef Name=&quot;ItemChildCount&quot;/&gt;&lt;FieldRef Name=&quot;DiscussionLastUpdated&quot;/&gt;&lt;FieldRef Name=&quot;PermMask&quot;/&gt;&lt;/ViewFields&gt;&lt;/View&gt;" UseInternalName="true" UseServerDataFormat="true" ID="dataformwebpart2">
      <SelectParameters>
        <WebPartPages:DataFormParameter Name="ListId" ParameterKey="ListId" PropertyName="ParameterValues" DefaultValue="48C8B709-CDB2-4BCC-8DBF-CC8CC11AD14A"/>
        <WebPartPages:DataFormParameter Name="WebURL" ParameterKey="WebURL" PropertyName="ParameterValues" DefaultValue="/"/>
      </SelectParameters>
    </SharePointWebControls:SPDataSource>
  </DataSources>
</WebPartPages:DataFormWebPart>
share|improve this question
    
Could AsyncRefresh be the issue? I facing XSL issues when AsyncRefresh is to true. –  SamJackSon Mar 18 '12 at 8:06
add comment

1 Answer

up vote 0 down vote accepted

If I have the OOB Discussion list on LEVEL 1 instead of ROOT, my DFWP works fine.

I shall use this as a workaround.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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