Tuesday, June 28, 2011

Query String URL Filter web parts error - No item exists and it may have been deleted or renamed by another user

We have several users using Query String URL Filter web parts to organize the content on the page. They have complained that the Query String Filter web part does not consistently working and sometimes they have the following error.

No item exists at http://sbx01/sites/Harry/SiteAssets/Filter2.aspx?ID=10.  It may have been deleted or renamed by another user.

Here is the way to reproduce this error.
  1. Create a list like task list and display ID column.
  2. Create a web part page and add two web parts. One for task list and another Query String Filter web part.
  3. Add Query String Parameter Name as ID to filter the list by ID
  4. Edit Query String Filter web part connections to "Send Filter Value to" task list
  5. Select "Consumer Field Name" as ID
  6. Verify the result by access URL like  http://sbx01/sites/Harry/SiteAssets/Filter2.aspx?ID=1


Please note the page created named Filter2.aspx. The syntax to pass the query string is ?ID=x and x represent to the number of the ID column.

If you try to access the URL while passing different numbers, sometime, you will get error "No item exists and it may have been deleted or renamed by another user". Sometime, you are fine for the first several items as someone else described here and MSDN site.

We tested the web part page and wiki pages. Both of them have the similar behavior. However, it's always working if you add the Query String Filter web part to the default view of the list page. One example is the task list page we are able to get the result http://sbx01/sites/Harry/Lists/Tasks/AllItems.aspx?ID=10.

After some testing and we were able to find the solution that is to avoid to use SharePoint out of box column name such as ID in the "Consumer Field Name" for Query String Filter web part connection. We could use MyID instead of ID and the page is working fine. This seems like to be same as described in version 2007.

From what we learned here, we should avoid to use SharePoint out of box column name  in the "Consumer Field Name" for Query String Filter web part connection. I'm hoping this has been documented somewhere in SharePoint user guide to avoid so much confusion for the end users.

No comments:

Post a Comment