Problem/Motivation
When setting a taxonomy term condition on a site that has multiple vocabularies with taxonomies terms that are the same, vocabularies cannot be distinguished unless you know the tid of the term. The 7.x version of context shows the taxonomy in a select list sorted by vocabulary which is much more friendly to multiple vocabularies than the autocomplete being used in the 8.x. Please return to the 7.x interface or find some other way to distinguish vocabularies.
Steps to reproduce
- add two vocabularies that have some of the same terms
- add a context that uses a term condition
- type in a term that appears in both vocabularies and it is not possible to see which one refers to which vocabulary.
Proposed resolution
Return to the 7.x interface for this condition or find some other solution that shows which vocabulary a term is part of.
Remaining tasks
User interface changes
Return to the 7.x interface for this condition or find some other solution that shows which vocabulary a term is part of.
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | staff-term-autocomplete.png | 34.47 KB | justcaldwell |
Issue fork term_condition-3279993
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3279993-vocabulary
changes, plain diff MR !25
- 3279993-make-term-conditions
changes, plain diff MR !12
Comments
Comment #4
loze commentedMR12 changes the UI to use a separate autocomplete field for each vocabulary, instead of a single autocomplete for all vocabularies.
Comment #5
loze commentedComment #6
justcaldwellAn option for anyone still facing this issue—we use Entity Reference Patterns to include additional information in entity/term reference results. After setting up a pattern to prefix terms with vocab name, our term autocomplete results look like this:
It works like Pathauto. You can define whatever pattern you like for terms and other entity types, so this can provide disambiguation in any entity reference autocomplete.
Comment #10
astonvictor commentedit's bad idea to use a lot of different fields per taxonomy vocabulary. It's possible to have e.g. 30 vocabularies that are not used for categorizing entities, and the UI will look not ok.
another solution is to update autocomplete suggestions to include vocabulary names.
fixed and merged.