Hello and thanks for this module that helps so much to usability :)

Problem/Motivation

I am using Search API and BEF. All works perfect but the checkboxes for multiple selections.

Proposed resolution

I saw that there wasn't a filter for SearchApiViewsHandlerFilterTaxonomyTerm, so I made it. And it works, so I put the patch in the first comment. I have checked and it works.

I am very happy to return a little to this module that I use so often. Have a good year!

Comments

candelas created an issue. See original summary.

candelas’s picture

StatusFileSize
new836 bytes
candelas’s picture

Status: Active » Needs review

For testing

kettultim’s picture

Just run into this as well - any word on a fix yet?

Martin.’s picture

I am experiencing this with 8.x-3.0-alpha2

tobiberlin’s picture

StatusFileSize
new973 bytes

Another issue I found with Better Exposed Filters is that "Nested checkboxes/ radiobuttons" was not selectable for taxonomy term referencing fields. So I adjusted the patch above a little bit.

classiccut’s picture

StatusFileSize
new950 bytes

It seems like the preceding elseif condition that checks if the filter is an instance of SearchApiViewsHandlerFilter would pass and thus never get to the condition that checks if the filter is an instance of SearchApiViewsHandlerFilterTaxonomyTerm. I've modified the patch to rearrange the conditions. I posted an updated patch.

surgeonbor’s picture

Rather than patching the module, you could implement hook_views_plugins_alter() like so...

function MODULE_views_plugins_alter(&$plugins) {
  $plugins['exposed_form']['better_exposed_filters']['handler'] = 'YOUR_VERSION_OF_better_exposed_filters_exposed_form_plugin';
}

In that custom plugin, copy the unpatched better_exposed_filters_exposed_form_plugin, and then add the code from the patch.

In addition to taxonomy terms, I had the same issue with the User Badges module, and I didn't want to hack BEF for that.

Having typed that out... it does make sense for BEF to better support taxonomy terms. But just FYI for anyone who wants to adapt this to other unsupported entities.

neslee canil pinto’s picture

Status: Needs review » Closed (won't fix)

Hi, there will be no more future development for 7.x branch. If you see this issue in 8.x, feel free to file an issue. Closing this as Closed(wont fix).