Validate that the term ID value is an array in taxonomy_index_tid views filter

Created on 7 January 2022, over 2 years ago
Updated 9 August 2024, 30 days ago

Problem/Motivation

I am getting the following error when used Better Exposed Filter and Grouped Filter with checkbox. Warning: Invalid argument supplied for foreach() in Drupal\taxonomy\Plugin\views\filter\TaxonomyIndexTid->validateExposed() (line 365 of core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php)

Steps to reproduce

Create a view and add an exposed filter (Term field or EntityReference Field) with Grouped Filter option and set Better Exposed Filter for the same field as Single On/Off Checkbox as screenshot attached. Now you will see the checkbox option on the page and when you select the checkbox and submit the form, will cause the error.

Proposed resolution

Check that $values is an array before passing it to the foreach()

๐Ÿ› Bug report
Status

RTBC

Version

11.0 ๐Ÿ”ฅ

Component
Viewsย  โ†’

Last updated about 12 hours ago

Created by

๐Ÿ‡ฎ๐Ÿ‡ณIndia jeetmail72 Noida

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

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024