- Issue created by @dieterholvoet
- 🇧🇪Belgium dieterholvoet Brussels
This would be fixed if we could somehow not let Tagify filter the results. So only Drupal does filtering, Tagify just shows the list of results that's returned by Drupal.
- First commit to issue fork.
- Merge request !122Issue #3458377: Add provisional fix for label alteration → (Closed) created by gxleano
- 🇪🇸Spain gxleano Cáceres
The same logic will be added to the Tagify User List module.
- 🇧🇪Belgium dieterholvoet Brussels
That doesn't fix the problem in my use case. I should've been more clear, I'll explain. I have an Artist content type with an 'Alternative spellings' field. I wrote a custom entity reference selection handler that doesn't only search the title field, but also the alternative spellings field. So imagine there's a 'Foo' artist with 'Bar' in its alternative spellings. Now, when I search for 'Bar', the autocomplete endpoint returns the following data:
[ { "entity_id": 15190, "entity_title": "Foo", "label": "Foo", "info_label": "", "editable": false }, { "entity_id": 9133, "entity_title": "Barox", "label": "Barox", "info_label": "", "editable": false }, { "entity_id": 5028, "entity_title": "Barker", "label": "Barker", "info_label": "", "editable": false }, { "entity_id": 7076, "entity_title": "Baraka", "label": "Baraka", "info_label": "", "editable": false } ]
but the first result isn't shown in the widget. Isn't it possible to disable Tagify filtering the results? I don't see why that's necessary, since the backend does the filtering.
- 🇪🇸Spain gxleano Cáceres
In my view, there are two distinct aspects here:
Bug Fix: The issue of matching results not appearing when a label is modified. This has been addressed in the current update. It appears that the label alteration feature wasn't functioning as expected, and the new logic now resolves this issue.
New Feature: The addition of alternative spellings or synonyms configuration for the Tagify widget. We can introduce a new configuration option in the widget that allows you to define alternative spellings or synonyms using tokens and specify the field that contains these variations.
So, I would create a new issue where add the requirements about the new feature.
- 🇧🇪Belgium dieterholvoet Brussels
New Feature: The addition of alternative spellings or synonyms configuration for the Tagify widget. We can introduce a new configuration option in the widget that allows you to define alternative spellings or synonyms using tokens and specify the field that contains these variations.
No, this is not what I asked. The alternative spellings feature is something I have in my own site, something that's completely handled within a custom entity reference selection handler. The only problem is that Tagify doesn't display a suggestion that's returned by Drupal if the search term is not contained in the suggestion. You can see that in the example JSON I embedded in my previous comment.
I just had a look myself and found an easy fix to make sure no results returned by Drupal are ever excluded from the Tagify dropdown.
- Merge request !123Make sure no results are excluded from the Tagify dropdown → (Merged) created by dieterholvoet
- 🇧🇪Belgium dieterholvoet Brussels
I updated the issue title and description to be more clear.
- 🇪🇸Spain gxleano Cáceres
Understood, I will take a look into your changes.
Thanks!
- 🇪🇸Spain gxleano Cáceres
I've been testing the MR and it's working as expecting.
It will be included in
1.2.31
release.