You can clone with
HTTPS or Subversion.
What steps will reproduce the problem?
1. Render a model with CListView with ajax pagination enabled
2. Create items enough to make it paginate
3. Go to a non-first page and do some ajax action (i.e. clicking a linkButton to delete the current registry)
What is the expected output? What do you see instead?
Clicking the first item of the 2nd page to won't do anything aside from reloading the page as if it would be doing something.
Clicking the second item of that same 2nd page would ask you to delete the second item of the first page, see?
What version of the product are you using? On what operating system?
Please provide any additional information below.
This very same is happening on the blog demo: http://www.yiiframework.com/demos/blog/index.php/comment/index (try to delete the second element of the second page, you'll see what it actually warns you about to delete).
Migrated from http://code.google.com/p/yii/issues/detail?id=2425
qiang.xue said, at 2012-01-01T03:36:54.000Z:
set for 1.1.10 milestone
Try to setup "CListView::ajaxUrl" with the base URL for your listing page.
There are few problems here but the main problem is that linkButton is not suitable to be used with CListView as it generates JS code for every comment so instead of having one JS handler for all delete links/buttons it renders one handler for every comment like:
When pagination was used e.g. going to the second page, the JS generated for that page was not run, but the initial JS code was still in effect and as the links IDs are generated automatically the second page links did get the same IDs as the links on the first page... That's why the comments deleted where from the first page.