Taxonomy term not limiting by vocab on autocomplete

Created on 21 March 2022, over 2 years ago
Updated 7 February 2024, 11 months ago

Problem/Motivation

Noticed that the autocomplete widget was not always filtering by vocabulary for taxonomy term entity references. Going through the code it pointed to the STRAW module, and the `getReferenceableEntities()` function. This problem does not always occur; and does not occur with other widgets.

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 change the conditional at the beginning of the `getReferenceableEntities()` function in straw\src\Plugin\EntityReferenceSelection\StrawSelection.php to include another variable which in some cases stores the bundle_type data if the configuration has gone wrong. If this is also null, the code continues to include all bundles.

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Closed: won't fix

Version

1.3

Component

Code

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