- πΊπ¦Ukraine vasyok
Drupal 9.5.
[For me] Today pathces are not needed for use with Autocomplite (Tags style) widget. Even if linked entites contain brackets.
But with popular_tags module (mb with some others) patch #18 is necessary. - πΈπ°Slovakia lubwn
Sadly this does not work in Drupal 9.5.9 at all. Putting any text in parentheses triggers an error so entities containing text in parentheses can not be referenced at all (nor created). Applying patch from #18 does not solve the issue.
- πΈπ°Slovakia lubwn
Sadly this is an error which seems to be too deep to be fixed in short term so I developed custom solution.
I have basicly only added new custom fields with same names as taxonomy fields I already had but with formatter "Text (plain)". Then I used hook_entity_presave() to match text inputted by user into those custom fields and check whether taxonomies exists by name or not, setting them to previously created taxonomy reference fields as target_id. In this custom solution you also have full control over what you want to use as a delimited between each taxonomy entity (for example ";" instead of "," or so)
I guess proper "Drupal" way would be either somehow fix the error or create custom taxonomy field formatter with the logic needed for that but to be fair that would take so much more time and effort as everything with Drupal that those custom hacks works better and are faster to implement.
- πΊπΈUnited States mortona2k Seattle
Patch for 10.3, continuation of #34.
I added a check on the matched entity ID in parenthesis to verify that it is an integer.
Now we can create new referenced entities with parenthesis.
For example: Natural Language Processing (NLP)
Referencing an existing entity that has a number in parenthesis is working.
Example: Collection (403)
Works with both typing in by name and using the autocomplete.
What does NOT work is verifying that the parenthesis value is a valid ID or otherwise creating a new entity.