Grouped Exposed filter, with Allow multiple selections throws error

Created on 9 July 2025, 5 days ago

Problem/Motivation

I'd like to have a View using an Grouped Exposed Filter with Multiple selections, using a Category field, but setting Grouped and Multiple selections causes a 500 error when trying to save.

Steps to reproduce

Create a Grouped Exposed Filter:
'Expose this filter to visitors, to allow them to change it' - checked
'Filter type to expose' - 'Grouped filters'
'Widget type' - 'Radios'
'Allow multiple selections' - checked
Create groupings

Save

For me this returns the following error in the console:

The website encountered an unexpected error. Please try again later.

TypeError: Illegal offset type in isset or empty in Drupal\taxonomy\Plugin\views\filter\TaxonomyIndexTid->validateExposed() (line 355 of core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php).

The culprit appears to be 'Allow multiple selections', without this the View will save

Proposed resolution

From what i can see the following line is at fault, the problem being that $input contains an array

if ($this->options['is_grouped'] && isset($this->options['group_info']['group_items'][$input])) {
$this->validated_exposed_input = $this->options['group_info']['group_items'][$input]['value'];
return;
}

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

10.1

Component

views.module

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024