January 20, 2012

SharePoint: List does not exist after adding Data Form Web Part to a page

Problem:

After checking in your Page Layout containing a Data Form Web Part and changing the page layout of the publishing page you get error:

List does not exist.
The page you selected contains a list that does not exist.  It may have been deleted by another user.

Specifically, your DFWP uses SharePoint List located on another site.

Solution:

SharePoint Designer has been helping you during the checkin process and has added two attributes to the Data Form Web Part: ListId and ListName. Remove those and you're good to go.

<WebPartPages:DataFormWebPart runat="server" Description=""  Title="Contacts" ... ListId="SOMEGUID" ListName="{SOMEGUID}" ...>

THIS MIGHT NOT BE RELEVANT: It may have also added duplicate ParameterBinding with correct list GUID, but incorrect Name. Should be "ListID". <ParameterBinding Name="ListId" Location="None" DefaultValue="SOMEGUID"/>

Note You need to keep removing those every now and then as they keep reappearing.

0 comments: