I updated from views_bulk_operations-6.x-1.10 to views_bulk_operations-6.x-1.11. Now the selectioned rows are not passed to the confirmation step.
I.E.: I select rows # 1, 3 and 5. I fill the email fields, but in the confirmation step, the system ask me to send just rows # 3 and 5.
I also attach the view for your further investigation.
thanks in advance
| Comment | File | Size | Author |
|---|---|---|---|
| utenti_gruppi_cloned.txt | 126.22 KB | Anonymous (not verified) |
Comments
Comment #1
bojanz commentedInteresting. I am able to sometimes get the same behavior on the core VBO views as well.
My theory is that it has to do with the new AJAX selection mechanism (for every checkbox you select, an AJAX request is fired). When you click submit not all requests have completed, thus giving you an incomplete selection. You can open the Chrome dev tool or Firebug and see the requests in action.
This can easily be tested by disabling the AJAX selection, go to your style plugin settings (gear icon next to Style: Views Bulk Operations), uncheck "Preserve selection across pages", and let me know if that changes anything.
Comment #2
Anonymous (not verified) commentedI unchecked "Preserve selection across pages" and the issue has gone away. thanks a lot. Do you want me to mark this post as closed?
Comment #3
bojanz commentedLet's keep it open for now. Perhaps someone can implement a fix (if the form sent more selected items than there are in the session, use them as well).
Comment #4
bojanz commentedRetitling.
Comment #5
Anonymous (not verified) commentedthe problem is back again. I've already tried both to flag and not to flag "Preserve selection across pages" option. Ajax is deactivated.
Comment #6
bojanz commentedThis is a bug that happens when "Preserve selection across pages" is on.
If you don't have it on, but have problems with dropped selection, open a new issue, cause it's probably an unrelated problem. Of course, include as much info as you can.
Comment #7
Anonymous (not verified) commentedsorry, you're right. I double checked the issue the bug happens when "Preserve selection across pages" is on.
Comment #8
infojunkie@giorez, the view that you attached references many third-party modules and CCK fields. Can you please reproduce the bug with only core Drupal + Views + VBO? Also specify which Views version you're working with. Thanks!
Comment #9
sittard commentedI'm using VBO 6-x-1.12 and also experiencing this issue when "Preserve selection across pages" is selected. Unfortunately my set-up includes a number of 3rd party modules and the view is fairly complex and includes CCK and taxonomy fields.
Comment #10
bojanz commentedI don't think we need additional info.
My theory is this: a heavy site takes a long time to bootstrap. So you go to a VBO view, and select 6 items fast. That's 6 AJAX requests doing a full drupal bootstrap.
By the time you've hit submit, some of them might not have completed, leading to an incomplete selection.
So VBO needs to look at the form state for the current page, and the session for all other pages.
Comment #11
Funksmaname commentedI'm getting the exact same issue - turning off "preserve selection across pages" fixed it - thanks for the info... is a fix technically possible?
Comment #12
infojunkieI will definitely take a look at this as soon as I get the chance. We should start by validating bojanz' theory.
Comment #13
bojanz commentedJust closed #1326834: Preserve selection functionality silently causes failure if JS fails as duplicate.
We should always use the form state values for the first page, and the session data for all other pages.
That would fix both issues, and is a simple fix.
Who wants to provide a patch? :)
Comment #14
mgriego commentedAh, looks like we're running into this on our site as well, and, yes, we do have a fairly heavy bootstrap, so I can absolutely see the ajax sometimes failing to complete if a user is clicking through the form too fast.
Comment #16
kenorb commentedSimilar?
#1370806: Enabling Persist selection yields 0 rows selected
Comment #17
infojunkiePlease take a look at similar issue #1449470: Queue the select ajax calls to avoid issue in sites that takes some secconds and check if latest dev fixes it.
Comment #18
djdevinThat doesn't fix the issue where if you select a bunch of items, then click the VBO button quickly before they have finished queuing, you end up with dropped rows. It's really easy to reproduce if you're a power user on a site that isn't super fast.
I think the VBO buttons should be disabled with JS until the queue has finished (temporarily grayed out or something) to prevent a click before the selection has been recorded.
Comment #19
infojunkieGood catch, thanks. I was able to reproduce this by inserting a
sleep(5)in theviews_bulk_operations_select()function which is responsible for real-time selection. I'll be working on it as time permits.Comment #20
infojunkieComment #21
infojunkieFixed this in the latest dev: commit 1, commit 2, commit 3.
VBO submit buttons are disabled during a selection sync, and the standard throbber appears. Note that the Garland theme redefines button styles, so disabled buttons will not appear differently than active ones, although they do act disabled.
Please try it (12 hours from now) and let me know if it works for you.
Comment #22
djdevinFast response, thanks - I was just dumping my thoughts! I'll test this from git.
Comment #23
djdevinYep, this seems to fix it.
Also tested both modes of actions (buttons and the dropdown).
Comment #24.0
(not verified) commented...