Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Fix for checkboxes visibility problem can be found in #21
Fix for checkboxes visibility problem can be found in #21
Comments
Comment #2
Graber CreditAttribution: Graber as a volunteer commentedCan you enter more details? Can't reproduce.. What settings and action annotation?
Comment #3
Graber CreditAttribution: Graber as a volunteer commentedOh I think I know what you mean. The "select all" checkbox is hidden since a few commits, you have to select all results using top checkbox or manually and press the button that will appear, similar as in the D7 version.
Comment #5
Graber CreditAttribution: Graber as a volunteer commentedAlso may be that you've been using a different display plugin, select all was working only on tables previously. Fixed.
Comment #6
skitten CreditAttribution: skitten commentedUpdated to 3e24d9c and I still don't see it appearing. I'll dig through the code later and see if I can work out what's going on.
Comment #7
skitten CreditAttribution: skitten commentedI don't understand why yet, but:
- 479ea4d broke Select All for same page configurable actions (when I comment out the changes that force the new page form)
- Select All never seemed to work when the configuration form is on a new page (if I go back to 88c18cb and choose configuration form on new page there doesn't seem to be a way to select all.
My view is a straightforward table, so I don't think that was an issue.
Comment #8
Graber CreditAttribution: Graber as a volunteer commented@skitten a few questions:
1. Do you see any errors in browser console?
2. When you inspect HTML below the "Apply to selected items" button do you see a hidden checkbox?
Is anyone else experiencing this issue?
Comment #9
skitten CreditAttribution: skitten commented1. No errors
2. No hidden checkbox.
Comment #10
Graber CreditAttribution: Graber as a volunteer commentedPlease provide steps to reproduce.
Comment #11
Graber CreditAttribution: Graber as a volunteer commentedPlease check this issue, it may be the cause of the problem.
Comment #12
Graber CreditAttribution: Graber as a volunteer commentedClosing after 3 months without activity.
Comment #13
skitten CreditAttribution: skitten commentedSorry - just getting around to digging into this again.
Actually I do have the hidden checkbox in the form, so my hypothesis is that there's something about my config (or theme?) that's making the javascript trickery fail.
I made a fresh view on my site and it doesn't show there either, so it's not something specific to a single view. Works fine on a clean site though (using 8.x-1.0 on both).
My javascript is weak but this gives me somewhere to start digging. This is important for our site so I'm motivated...
Comment #14
skitten CreditAttribution: skitten commentedFigured it out; my theme is based on Bootstrap, and bootstrap's template for Views tables gives them class 'table' rather than 'views-table'. By overriding the template in my theme and adding the 'views-table' class I get the select all button to appear and work. Not sure what the correct fix for this should be.
It's still a little broken as it's not getting the string for the button.
Repo steps: Install drupal/bootstrap and set it as your default theme.
Comment #15
Graber CreditAttribution: Graber as a volunteer commentedGreat, we should make VBO js theme - independent as possible, although js functionality can always be broken by custom HTML from a theme.
A good solution would be adding a custom class to the view table container in the backend and using it in the js.
classes are / can be added in
Drupal\views_bulk_operations\Plugin\views\field\ViewsBulkOperationsBulkForm::viewsForm()
.Also adding an issue that could be related, maybe even a duplicate.
This will also need a port to 2.x
Comment #16
joelpittet@skitten if bootstrap allows to inject CSS classes that we can count on it may be good to add a vbo-table class in there so we don't count on 'classy' classes.
Comment #17
DuneBLI got the same problem: using bootstrap and vbo 2.x
If the vbo column containing the checkbox is the first column, then the checkbox is not visible.
But, it was not a class name problem as explained in #14 ('table' vs 'views-table'), it was a margin-left problem that I could solve by adding this css rule:
note: the problem is not in vbo 1.x (I have tested twice... seems really strange)
Do you think I should add this bug in the bootstrap queue?
Comment #18
Graber CreditAttribution: Graber as a volunteer commentedWe'll try to make VBO theme-independent as possible by adding its own class, but I'm afraid it'll not solve all the issues as js depends on the DOM structure. Wait a bit with that Bootstrap issue please.
Comment #19
Graber CreditAttribution: Graber as a volunteer commentedI uploaded a more general patch for 2.x in https://www.drupal.org/project/views_bulk_operations/issues/2932177#comm.... The solution can be backported to 1.x. In general field plugin sets a param that is read by views_table preprocess hook where a class is added.
Unfortunately I don't have any more time to split that to 2 diffrerent issues so it'll probably be in one commit with #2932177 for 2.x.
Comment #20
DuneBLI have removed my #17 css fix and I have applied https://www.drupal.org/project/views_bulk_operations/issues/2932177#comm... , but unfortunately the checkbox is not visible again...
Re-applying #17 fix it
Comment #21
DuneBLTaking into account the new styles vbo-table, here is an updated css patch to display the checkboxes in bootstrap theme:
Comment #22
Graber CreditAttribution: Graber as a volunteer commentedOk, now we can be sure this calls for an issue on Bootstrap theme project.
Also changing title so hopefully others having similar issues will find a solution easier.
I think we'll be able to set this to "Fixed" when the new class will be committed to 2.x (soon enough)
Comment #23
DuneBLI have added an issue in the bootstrap queue to add the css tweak in #21: https://www.drupal.org/project/bootstrap/issues/2944364
Comment #24
Graber CreditAttribution: Graber as a volunteer commentedGreat, I think we did everything to solve the issue, setting this to fixed.
Thanks!
Comment #25
Graber CreditAttribution: Graber as a volunteer commented