



This post applies to Microsoft Office SharePoint Server 2007 and WSS 3.0
Scenario: You have created a custom .aspx page with SharePoint Designer that has a custom data view that shows data from a SharePoint list. You Save the custom site with its custom .aspx pages and move it to another SharePoint site. When opening up the custom .aspx page in the new location, you get an error on the page that says, “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.” How do you fix this?
Solution: Open the custom .aspx page in SharePoint Designer and look for the tag that encloses the DataFormWebPart that is being used to render the data view from the list. It should have a tag that has:
<WebPartPages:DataFormWebPart runat=”server” …………. ><ParameterBindings>
Now look for:
<ParameterBinding Name=”ListID” Location=”None” DefaultValue=”########-####-####-####-############” />
This ParameterBinding tag that has the ListID defined will be using the ListID of the Original List (the old site). You will need to change this definition to the ListID of the new site.
Now, you will need to go to the List that is located on the new site that the custom .aspx page is looking for to render the data to the view. Once you locate the list, click on Settings List Settings. Copy the URL that is rendered in the Address Bar to a text editor. The URL will look something like:
http://vhamoss/sites/whateversite/_layouts/listedit.aspx?List=%7B11111111%2D1111%2D1111%2D1111%2D111111111111%7D
In your text editor, delete everything in the URL up to the % symbol, just after the “List=”.
Now change the “%7B” to “{“.
Change all instances of “%2D” to “-“.
Finally, change the “%7D” to “}”.
You should now have the ListID: {11111111-1111-1111-1111-111111111111} (Obviously you number will be different than a bunch of ones).
Now that you have the new ListID, go back to SharePoint Designer, open the new custom.aspx page, and locate that tag again as described above and substitute the old ListID with the new one that you have just created in your text editor. You will not need to past the “{“ “}” symbols. You will just need the numbers with the dashes (same format as the old one).
Save the edited custom .aspx page in SharePoint Designer and refresh the page in your Browser.
You will now see the custom .aspx page in the new location with the correct data and no errors.
ALSO NOTE: It is easier to just do a FIND/REPLACE of the old List ID with the new LIst ID across the entire Custom page. It will most likely be a case where an instance of the List ID will need to be replaced in more locations than the above referenced location (depending on how you setup your data view).










More Options ...

Categories
Tag Cloud
Blog RSS
Comments RSS

Void
Life « Default
Earth
Wind
Water
Fire
Light 