Taxonomy term not limiting by vocab on autocomplete

Created on 18 March 2022, over 2 years ago
Updated 12 February 2024, 9 months ago

Problem/Motivation

We noticed on multiple websites that using the autocomplete widget for entity references for taxonomy terms was still pulling from all vocabularies, despite selecting vocabularies. This is not happening on all widget types.

Steps to reproduce

Create an entity reference field referencing taxonomy; and then refine by at least one vocabulary. On the 'manage form display', set to autocorrect. Going into the form to use the field, it does not refine by the vocabulary set.

Proposed resolution

Proposed resolution is to check the configuration in the `buildEntityQuery()` function in Drupal\Core\Entity\Plugin\EntityReferenceSelection\DefaultSelection.php, and using a variable to replace direct configuration comparison, giving the option to pull from the 'handler_settings' if the target bundles haven't been correctly configured.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

🐛 Bug report
Status

Closed: works as designed

Version

9.4

Component
Entity 

Last updated 4 minutes ago

Created by

🇬🇧United Kingdom Jennylwilson04

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

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