Autocomplete Machine Name views filter not working.

Created on 13 September 2023, about 1 year ago

Problem/Motivation

If you choose the Autocomplete selection type for a view filter (exposed or not), the term id value is still used instead of the machine_name in the resulting views query.

The Dropdown selection type seems to work fine.

Steps to reproduce

1. Create a view.
2. Reference the Taxonomy Term entity through your entity reference field to create a relationship.
3. Add a "Machine Name" filter, using that relationship.
4. If not exposed, configure the filter to use a specific term via the autocomplete field.
5. If exposed, use the exposed filter widget to select a term via the autocomplete field.

In my tests, I am noticing that the autocomplete text input is showing the term ID in parenthesis as a normal taxonomy term autocomplete filter would. I am also seeing seeing this in my preview of the query:

WHERE ((taxonomy_term_field_data_media__field_dua_document_type.machine_name = '22'))

I do have this core patch installed, https://www.drupal.org/project/drupal/issues/3347343 ✨ Continuation Add Views EntityReference filter to be available for all entity reference fields Needs work , and I thought they might be conflicting. However, I think the problem continues even if I remove that core patch.

My app has a lot of moving parts, so I wouldn't be surprised if this problem is unique to my situation. Could someone else confirm or reject that this is happening to them as well?

πŸ› Bug report
Status

Active

Version

2.0

Component

Views

Created by

πŸ‡ΊπŸ‡ΈUnited States JonMcL Brooklyn, NY

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

Comments & Activities

Production build 0.71.5 2024