Closed (fixed)
Project:
Views Bulk Operations (VBO)
Version:
4.2.x-dev
Component:
User interface
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
11 Dec 2018 at 15:29 UTC
Updated:
12 Aug 2023 at 16:29 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
renrhafWe also encountered this bug
Comment #3
graber commentedI tried pressing ctrl-shift on a VBO view and on a core bulk operations view, both with tableselect.. nothing happened.
I tried using tab and space to make selection - worked on both.
Can you tell me more about this selection method? I'm using a Mac and Chrome..
Comment #4
renrhafHi Graber, usually to select multiple entries in a tableselect, I check the first one I want to be selected, then I scroll to the last item I want selected and keep shift pressed while clicking in the checkbox. All rows between the first and last one are selected.
It seems that VBO does only consider first and last as checked. I'm on Windows and Firefox/Chrome.
Comment #5
graber commentedYou're right.. I have no idea how to handle this at the moment, just that it has to be done in js/frontUi.js some similar way the tableselect select all checkbox is handled.
Comment #6
graber commentedWhat's with the ctrl in description then when you need to hold shift only?
Comment #7
renrhafI'm not sure about the ctrl mentioned in the description, but I think it's related to the same underlying issue.
Maybe @jaapjan could enlight this matter ?
Comment #8
renrhafHere is a patch for using same behavior as the tableSelect.
I also created a patch for the current 8.x-3.13 version of the module.
Comment #9
renrhafFixing an issue with "Select / deselect all results in this view (all pages, ... total)" checkbox
Comment #10
n_e_ commentedThis patch also fixes issues with multi-selection for the 4.x branch.
Comment #11
graber commentedBumping version for this.
Comment #12
renrhafRerolled patch for 4.1 branch
Comment #13
renrhafRerolled patch for 4.2 branch.
Can someone test this patch so we can RTBC ?
Or else I'm doomed to do rerolls for eternity ;)
Comment #15
graber commentedYes, yes, I was afraid of this as the last JS improvement broke things and had to fix myself as of course the commit author didn't treat that as a priority. Luckily we have JS tests on now.
I'll commit this when I see it's sufficiently tested, don't want additional hotfixing after the next release.
Comment #16
renrhafOkay thanks, sorry I did not mean to put the rush on you. Thank you for all your work on this module.
I will help as much as possible, tell me if anything has to be changed on this patch.
I see the tests failed, I'll take a look on it
Comment #17
graber commentedI know JS tests can be tricky so a few hints:
Drupal\FunctionalJavascriptTests\WebDriverTestBase::createScreenshot()($this->createScreenshot()), wherever needed - it helps a lot.Comment #18
graber commentedI think I came up with a more simple solution, described it there. In short we don't have to check what key the user pressed but just check state of all checkboxes in the view. It should be a very small change this way.
Comment #19
kopeboyActually I just found out that after updating Drupal core from 10.0.9 to 10.1.0 even a normal click selection (not just in a table display but unformatted list as well) is not reflected in the vbo form wrapper (which is now at the bottom of the view only).
After checking one or more items, the buttons are enabled (and vbo will correctly execute on them) but "No items selected" is not updated.

Should I open another issue or should this be solved here?
Comment #20
kopeboyWhen using core's "Bulk update" views field instead of "Views bulk operations", the selection is updated in the UI instead:

Comment #21
kopeboyThis comment in the related issue might be relevant and the cause of my bug:
Comment #22
graber commentedPlease test this one, it's using my last concept.
The good thing about it is that it should be fool proof in all cases, every change checks the entire page state.
The bad thing is a bit worse performance as we send more data and do more checking in the frontend but it shouldn't be an issue.
Also contains a bit of cleanup.
Please test in the following areas as there may be regressions:
- multiple VBO views on the same page
- multiple tables (was it aggregation?)
Comment #23
solideogloria commented#22 does fix the shift+click issue, and the selection logic is much better than before.
However, I noticed that the VBO count part that says "Selected # items" doesn't update properly after clicking a "select all" checkbox. I have a view with rows grouped by a field, so there are multiple "select all" checkboxes, one for each grouping. Still, I think I could reproduce this with only a single "select all".
Example with 5 rows:
Note that each time I say to click "select all", I'm talking about the select all checkbox on the table, not the "Select / deselect all results (all pages, # total)" shown by the VBO popup.
Comment #24
graber commentedThank you for your testing @solideogloria, I fixed the mentioned issue, please retest, hopefully now all is ok.
Comment #25
graber commentedComment #26
graber commentedThis should do the trick. Please retest.
Comment #27
solideogloria commentedPatch #26 fixes the issues I mentioned in #23.
Comment #29
graber commentedThank you.
Comment #30
shane birley commentedI just tested the patch as well. I can confirm it works! Thanks, @Graber.