Problem/Motivation
Exposed checkbox filter widget is not working when the operator is exposed
Steps to reproduce
1) Create taxonomy term with some terms
2) Add Taxonomy reference to the created taxonomy vocabulary on a content type
3) Goto views and edit the content view
4) Add the taxonomy reference as an exposed dropdown filter and allow multiple selections
5) Change the exposed form style to BEF
6) Open the exposed form options and select the added filter choose widget: checkboxes
At this point everything works as expected
7) Edit the exposed filter and select Expose operator.
No more checkboxes :c
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | Screenshot 3357961 after patch.png | 12.95 KB | arpitk |
| #5 | Screenshot 3357961 before patch.png | 13.07 KB | arpitk |
| #4 | 3357961-4.patch | 2.51 KB | shailja179 |
Comments
Comment #2
victonator commentedWhen commenting code in the views module in file core/modules/views/src/Plugin/views/filter/FilterPluginBase.php (Line 957-962) It works as expected.
Comment #3
shailja179 commentedComment #4
shailja179 commentedThis patch will fix the issue for checkboxes. Try it with latest version(6.0.3) of module.
Comment #5
arpitk commentedI tested this patch #4 on version 6.0.3. Attaching the screenshots for tags filter before and after applying patch.
Thanks!
Comment #6
victonator commentedPatch #4 works, but when a lot of checkboxes are present, a scrollable element is needed (Like before) else the filter will be really long.
Comment #7
victonator commentedNevermind my previous comment #6, Patch #4 works like intended
Comment #8
fluidstack commentedI can confirm Patch # 4 works as expected. However, i just logged a new issue very similar to this, but it is using the "Remember the last selection" feature. https://www.drupal.org/project/better_exposed_filters/issues/3359182
Comment #10
smustgrave commentedConfirmed the issue and that the patch solves the issue.
Comment #11
smustgrave commented