DVWPs “Fall Off the Page”
This post is really more of a plea (assuming that anyone is out there reading this). Tell me that I’m not losing it.
I have built an "application" in a SharePoint site. (This application manages the sporting event tickets that my client has available to dole out to various executives to use with clients.) The application consists of about 30 .aspx pages, most of which have Data Form Web Parts (DFWPs or DVWPs) on them either to display contents of list items or to create or edit list items.
Since we have moved this site to the production environment, we have seen multiple instances where the DVWPs have simple disappeared from various pages. We usually notice this when someone is looking at a page in the browser and doesn’t see what they expect. When we open the page in SharePoint Designer, the Web Part(s) have cleanly disappeared form the page’s code. When I say cleanly, I mean that only the code for the DVWP(s) is missing; all other page code is intact and functional.
We’ve checked the date/time stamp and author on the page(s) when this has happened, and we all agree that the pages have changed since the last edit. (I did think at one point that I must be doing something since this was so strange.)
As an example, here is a DVWP that I had to put back into a page this morning. It is a simple one that we use on most pages to just show one item from a list that contains the site image and title. Because it is reused frequently, I am using <XslLink> to point to an external XSL source:
<WebPartPages:DataFormWebPart runat="server" SuppressWebPartChrome="False" Description="" PartImageSmall="" DataSourceID="" MissingAssembly="Cannot import this Web Part." FrameType="None" ConnectionID="00000000-0000-0000-0000-000000000000" DetailLink="" ExportControlledProperties="True" IsVisible="True" AllowRemove="True" AllowEdit="True" ID="g_395fc560_05c9_4995_a21a_0b00cf0d90d5" Dir="Default" FrameState="Normal" ViewContentTypeId="" AllowConnect="True" PageSize="-1" AllowMinimize="True" IsIncludedFilter="" ShowWithSampleData="False" ChromeType="None" HelpMode="Modeless" ExportMode="All" ViewFlag="0" Title="TMS Site Parameters" HelpLink="" AllowHide="True" AllowZoneChange="True" PartOrder="1" UseSQLDataSourcePaging="True" PartImageLarge="" IsIncluded="True" NoDefaultStyle="TRUE" __MarkupType="vsattributemarkup" __WebPartId="{395FC560-05C9-4995-A21A-0B00CF0D90D5}" __AllowXSLTEditing="true" WebPart="true" Height="" Width=""><XslLink>
XSL/PageHeader.xsl</XslLink>
<DataSources>
<SharePoint:SPDataSource runat="server" DataSourceMode="List" SelectCommand="<View></View>" UseInternalName="True" ID="dataformwebpart3"><SelectParameters><WebPartPages:DataFormParameter ParameterKey="ListName" PropertyName="ParameterValues" DefaultValue="TMS Site Parameters" Name="ListName"></WebPartPages:DataFormParameter><WebPartPages:DataFormParameter ParameterKey="WebURL" PropertyName="ParameterValues" DefaultValue="/sites/GMTMS/" Name="WebURL"></WebPartPages:DataFormParameter>
</SelectParameters>
</SharePoint:SPDataSource>
</DataSources>
<ParameterBindings>
<ParameterBinding Name="dvt_apos" Location="Postback;Connection"/>
<ParameterBinding Name="UserID" Location="CAMLVariable" DefaultValue="CurrentUserName"/>
<ParameterBinding Name="Today" Location="CAMLVariable" DefaultValue="CurrentDate"/>
<ParameterBinding Name="WebURL" Location="None" DefaultValue="/sites/GMTMS/"/>
<ParameterBinding Name="URL" Location="ServerVariable(URL)" DefaultValue=""/></ParameterBindings>
<DataFields>@Title,Site Title;@Site_x0020_Logo,Site Logo;@Site_x0020_Relative_x0020_URL,Site Relative URL;@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;</DataFields>
</WebPartPages:DataFormWebPart>
This has happened with different DVWPs on various pages. When we’ve seen this, I’ve quickly fixed it using code I’ve got stashed elsewhere because this site is one that is already in use.
Anyone out there have any ideas?
One Comment