Using both grouped filters and BEF on taxonomy term filters causes a multitude or warnings and notices:

Notice: Undefined index: #default_value in function theme_select_as_checkboxes() (/var/www/sites/all/modules/better_exposed_filters/better_exposed_filters.theme line 84).
Warning: array_search() expects parameter 2 to be array, null given in function theme_select_as_checkboxes() (/var/www/sites/all/modules/better_exposed_filters/better_exposed_filters.theme line 124).

Found and fixed the culprit code, patch attached, please port asap.

Files: 
CommentFileSizeAuthor
#8 bef_grouped_filters_bug-2032193-8.patch625 bytesmauricio.molina
Test request sent.
[ View ]
bef_grouped_filters_bug_2013-07-01.patch1.46 KBKarsa
Test request sent.
[ View ]

Comments

Karsa’s picture

Status:Patch (to be ported)» Needs review
mikeker’s picture

Status:Needs review» Postponed (maintainer needs more info)

Can you give me steps to repro this bug? I'm unable with basic grouped exposed filters and BEF.

Thanks.

Karsa’s picture

Status:Postponed (maintainer needs more info)» Needs work

I added a basic taxonomy term filter, made it grouped, added five options (I think the number of options is key), selected BEF, made my term filter display as checkboxes. And that was all.
See: http://karsa.org/views_test/articles_bef

giorez’s picture

same issue
Notice: Undefined index: og_group_ref_target_id_op in better_exposed_filters_exposed_form_plugin->exposed_form_alter() (line 1263 of /sites/all/modules/better_exposed_filters/better_exposed_filters_exposed_form_plugin.inc).

amaisano’s picture

Issue summary:View changes

This is happening for me except with an "Author UID" filter, set to have groups (one option for each of our 2 administrators, plus a default of -any-).

Kojo Unsui’s picture

I had the same notice Undefined index: #default_value in function theme_select_as_checkboxes() (... better_exposed_filters.theme line 84). To reproduce

  • Add a taxonomy exposed filter
  • Use Grouped filters, and miltiple selection
  • in BEF settings for this filter, display as checkboxes

The patch solves it. Thanks

Pere Orga’s picture

I confirm the issue and that the patch fixes the warning. However, the current patch does not follow Drupal coding standards (needs a space after the if)

mauricio.molina’s picture

Status:Needs work» Needs review
StatusFileSize
new625 bytes
Test request sent.
[ View ]

Re-rolling the patch against the latest 7.x-3.x-dev branch. Looks like the changes to `better_exposed_filters_exposed_form_plugin.inc` aren't necessary anymore. Also renaming to follow patch standards.