Problem/Motivation
If I use "Autocomplete (Tags with selectize.js)" on:
Entity reference (Taxonomy Term) field
"Create referenced entities if they don't already exist" enabled
One vocabulary selected
selectize works perfectly UNLESS I 'Add' a term that matches one that already exists within another vocabulary .
Then if I try and save the node it then fails with an error :
This entity (taxonomy_term: 124) cannot be referenced.
Where term 124 is the matching term in the other vocabulary. (Not the vocabulary set for the field).
Comments
Comment #2
mistergroove commentedComparing validateEntityAutocomplete in Drupal\Core\Entity\Element\EntityAutocomplete and Drupal\selectize\Element\SelectizeEntityAutocomplete it seems the issue is the options are set differently now :
Drupal\Core\Entity\Element\EntityAutocomplete
Drupal\selectize\Element\SelectizeEntityAutocomplete
Changing it the selectize one to match seems to solve the issue.
Comment #3
mistergroove commentedI've made a patch which addresses this issue and the drag and drop issue in https://www.drupal.org/project/selectize/issues/3458652 for testing.