I've noticed strange behavior and my use-case seems pretty simple so I thought I would document it. In short, VBO's selection of rows fails if "Preserve Selection across pages" is ENABLED. Interestingly, *how* it fails varies depends on the "Items to Display" and "Pager" settings. See my immediate comments for details.

Also, highly similar issue where I learned to disable preserver selection: #1294326: When I select rows and try to bulk edit it says "0 rows" selected
I am using: VBO 6.x-1.x-dev & Views 6.x-2.16

CommentFileSizeAuthor
#1 simple_view_export.txt13.64 KBkbk

Comments

kbk’s picture

StatusFileSize
new13.64 KB

Consistent Settings
Style: Bulk Operations
Modify node fields (views_bulk_operations_fields_action) = ON (CCK Integer field selected)
Other VBO Settings: Default
Filter by Node Type = Application

Alternate Settings 1
Preserve selection across pages = ON
Use pager: NO
Items to display: Unlimited

Edit Action: Select a single node
Result: "You selected the following 0 rows:"

Alternate Settings 2
Preserve selection across pages = ON
Use pager: NO
Items to display: 10 (I have ~50 nodes)

Edit Action: Select a single node
Result: "You selected all rows in this view."

Alternate Settings 3
Preserve selection across pages = ON
Use pager: YES (pager type is irrelevant)
Items to display: 10 (I have ~50 nodes)

Edit Action: Select a single node
Result: "You selected the following 0 rows:"

Alternate Settings 4
Preserve selection across pages = OFF
Use pager: YES
Items to display: 10 (I have ~50 nodes)

Edit Action: Select a single node
Result: "You selected the following 1 row: [user's] Application"

Alternate Settings 5
Preserve selection across pages = OFF
Use pager: NO
Items to display: 10 (I have ~50 nodes)

Edit Action: Select a single node
Result: "You selected the following 1 row: [user's] Application"

Further Notes
Pager and Items to display settings are irrelevant after "Persist selection" is disabled.
Find export of my view attached.

infojunkie’s picture

Thanks for the thorough analysis. It will be invaluable to debug this problem.

infojunkie’s picture

Committed an important change as per #1280776: Bring back "select all" checkbox. Please try the latest version and let me know if it works better.

kbk’s picture

No change using the 2011-Dec-15 dev version.

infojunkie’s picture

Can you please remove the date field and try again? I suspect that the date field is causing some weird errors. Please try with just the title.

infojunkie’s picture

Also, please try Views 3.x if you can - it could fix the date problem if that turns out to be the case.

akeimou’s picture

i have a similar problem of "You selected the following 0 rows" but it involves persisting the selection for an exposed filter of the view by having its "Remember" setting turned on. Problem disappears when Remember is turned off, even though the "Preserve selection across pages" setting itself for the view's VBO style is still on. And it doesn't matter whether the exposed filter is on a date field or not, as long as it's a selection type.

bojanz’s picture

I've seen problems with the date field and VBO before as well.

kbk’s picture

@ #5 and #6

- There isn't a date field in the view. The Year is an CCK Integer
- I can't try out Views 3 as this site is live.

justingeeslin’s picture

I am having this problem as well.

When the 'Preserve selection across pages' setting is enabled, '0 rows' are always selected.

When the 'Preserve selection across pages' setting is disabled, rows can be selected as expected.

I'm PHP 5.1. Latest dev.

kenorb’s picture

The same problem.
Once 'Preserve selection across pages' is disabled it works, otherwise it's selecting 0 rows.

The problem in my case exists ONLY if I select some language (which is exposed) and Apply to current view.
My Filters: 'Node translation: Language exposed'

CASE when it works:
1. Going to view: /features/34252
2. Selecting row and action: 'Export nodes' and I'm clicking Execute
3. I'm redirected to another page with 'Set parameters for Export nodes' page (URL is not changed: /features/34252)
4. When clicking Next, I've one selected item (that's great).

CASE when it doesn't work:
1. Going to view: /features/34252
2. Selecting any Language and I'm clicking 'Apply' (no changes in URL)
3. Selecting row and action: 'Export nodes' and I'm clicking Execute
4. I'm redirected to another page with 'Set parameters for Export nodes' page (URL is CHANGED to: /features?language%5B%5D=en)
5. When clicking Next, I've 0 selected item (that's bad).
"Are you sure you want to perform Export nodes on the selected items?
You selected the following 0 items:"

Looks like it doesn't work when exposed filters has been applied somehow, but works when 'Preserve selection across pages' is disabled.
And it's not really related that URL has been changed to the one without nid, because sometimes I've URL: /features?language[0]=en for confirmation page and the row is selected.

Secondly I've found another bug, when previously I select some node (1) and go to confirmation page, then I'll go to the front page and choose different node, checkboxes are automatically selected with the next node (2), but on the confirmation page I see old node selected (1). The node is right only if I click 'Cancel' on the confirmation page.

Environment:
Drupal: 6.22
PHP: 5.2.17
Views: 6.x-2.16 with patch #1186272: Reorder pre_render calls
VBO: 6.x-1.x-dev (latest)

kenorb’s picture