Support for Taxonomy Terms

Created on 26 July 2025, 2 days ago

Problem/Motivation

While this seems to work for most entity reference filters, it does not seem to work for taxonomy terms.

The culprit seems to be taxonomy_field_views_data_alter() which will configure any taxonomy_term entity reference fields (besides delta) to use 'taxonomy_index_tid' as the filter plugin ID instead of numeric.

Steps to reproduce

  1. Add a filter for a reference field to a taxonomy term
  2. Note that we do not have the option to choose "Reference method" in the filter configuration, only the Vocabulary

Proposed resolution

Modify views_core_entity_reference_views_data_alter() to add 'taxonomy_index_tid' to the list of filter IDs we're overriding.

Remaining tasks

N/A

User interface changes

N/A

API changes

N/A

Data model changes

N/A

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇨🇦Canada mdolnik

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

Merge Requests

Comments & Activities

  • Issue created by @mdolnik
  • Pipeline finished with Success
    2 days ago
    Total: 263s
    #557591
  • 🇬🇧United Kingdom scott_euser

    Thanks for the contribution, however Taxonomy Index Tid is a valid filter though and already allows things like BEF to work on it (compared to numeric/string entity reference filters).

    If this module was to accept such a change it would need to be opt in, not default (e.g. a new config page) and include test coverage. Otherwise we age forcing a new behaviour on all existing users of the module which meant others may not want. For now will close but if multiple people feel strongly and are willing to contribute the above, could reconsider.

Production build 0.71.5 2024