I got this error when trying to edit the exposed filters settings of a view where a select filter on a list text field was exposed.

Notice : Undefined index: value in Drupal\better_exposed_filters\Plugin\views\exposed_form\BetterExposedFilters->buildOptionsForm() (line 534 of [...]/better_exposed_filters/src/Plugin/views/exposed_form/BetterExposedFilters.php).

Here's a patch to fix it.

Comments

GaëlG created an issue. See original summary.

carnerik’s picture

Patch fixed my (similar? exact same?) issue "Notice: Undefined index: #type in Drupal\better_exposed_filters\Plugin\views\exposed_form\BetterExposedFilters->buildOptionsForm() (line 534 of [...]/better_exposed_filters/src/Plugin/views/exposed_form/BetterExposedFilters.php)."

@GaëlG Thanks!

a.milkovsky’s picture

Status: Needs review » Reviewed & tested by the community

This patch fixes the issue.

AnaSwin’s picture

Hello,

I have the same problem on my exposed filters.
I applied the patch on D8.6.2 with PHP 7.1 and it works!

Thank you a lot!

tame4tex’s picture

Status: Reviewed & tested by the community » Needs review
StatusFileSize
new1.07 KB
new1.01 KB

Patch #1 has a confusing conditional structure and needed additional brackets. Also, it did not fix an additional PHP Notice: `Undefined index: #type in Drupal\better_exposed_filters\Plugin\views\exposed_form\BetterExposedFilters->buildOptionsForm() (line 534 of`

The attached patch fixes both.

jorgespiessens’s picture

Patch works on 8.x-3.0-alpha5

zorax’s picture

Patch works on 8.6.13

pieterdc’s picture

Patch from comment #5 still works. Currently at BEF 8.x-3.0-alpha6 and Drupal 8.6.14

jeremyr’s picture

Status: Needs review » Reviewed & tested by the community

Confirming that this patch fixes the issue here as well as the related issue here: https://www.drupal.org/project/better_exposed_filters/issues/3038114

  • rlhawk committed 81ae034 on 8.x-3.x authored by tame4tex
    Issue #3012046 by tame4tex, GaëlG: Undefined index: value in...
rlhawk’s picture

Status: Reviewed & tested by the community » Fixed

Thanks, all.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

siavash’s picture

Version: 8.x-3.x-dev » 8.x-4.x-dev

I'm having the same issue but on the 4.0 version. Settings link doesn't result in a popup and gives this notice.
Notice: Undefined index: exposed_form_options in /docroot/modules/contrib/better_exposed_filters/src/Plugin/views/exposed_form/BetterExposedFilters.php on line 190

nikitas’s picture

@siavash had the same issue, i updated to latest dev version via composer.

composer require drupal/better_exposed_filters:4.x-dev

problem solved.