Issue with Checkbox/Radio Button in Exposed Taxonomy Filter Using Multiple Vocabularies

Created on 17 March 2025, 3 months ago

Problem/Motivation

I have applied patch #207 from the issue https://www.drupal.org/project/drupal/issues/2784233: Allow multiple vocabularies in taxonomy filters to support multiple vocabularies in the taxonomy filter on an exposed view.

The patch works correctly. However, I encountered an issue when changing the Exposed Filter Widget to Checkboxes/Radio Buttons in the Exposed Filter Settings. The filter does not work as expected because the Term IDs (TIDs) from multiple vocabularies are not preserved correctly.

Steps to reproduce

Apply patch #207 from the issue https://www.drupal.org/project/drupal/issues/2784233 Allow multiple vocabularies in the taxonomy filter Needs work .
Create a view with a taxonomy term filter using two or more vocabularies.
Expose the filter and select Checkboxes/Radio Buttons as the Exposed Filter Widget.
Try filtering content by selecting terms from different vocabularies.

Proposed resolution

we can use array_replace instead of array_merge
$flat_options = array_replace($flat_options, self::flattenOptions($choice));

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

6.0

Component

Code

Created by

🇮🇳India manthan.chauhan

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

Comments & Activities

Production build 0.71.5 2024