- šŗšøUnited States dasginganinja Bethlehem, PA
I have tested the latest patch #6 and it doesn't work with Drupal 9.5.9.
I observe the same error upon form submission.
- First commit to issue fork.
- Open on Drupal.org āCore: 10.0.7 + Environment: PHP 8.1 & MySQL 8last update
over 1 year ago Waiting for branch to pass - Status changed to Needs review
over 1 year ago 3:08pm 6 June 2023 - Open on Drupal.org āCore: 10.0.7 + Environment: PHP 8.1 & MySQL 8last update
over 1 year ago Waiting for branch to pass - Open on Drupal.org āCore: 10.0.7 + Environment: PHP 8.1 & MySQL 8last update
over 1 year ago Waiting for branch to pass - Open on Drupal.org āCore: 10.0.7 + Environment: PHP 8.1 & MySQL 8last update
over 1 year ago Waiting for branch to pass - Open on Drupal.org āCore: 10.0.7 + Environment: PHP 8.1 & MySQL 8last update
over 1 year ago Waiting for branch to pass - šøš®Slovenia gombi
I was unable to reproduce the issue described by Nicolas and the patch #6 appears to work for me on Drupal 9.5.9 as well.
I did, however, encounter an issue with it when using "Views: Filter by an entity reference view". When using the patch, the field was ignoring the view and instead always displaying the results in the form of "Title - (ID)". I don't believe this to be the desired effect.
I've modified the patch to only add the entity id inside brackets when editing an existing Entity.
Moving this to needs review, but as I was unable to reproduce the issues described above, the patch might require some additional work.
- šøš¦Saudi Arabia martins.bruvelis Thuwal
It seems that the
item.label
in with the addition ofid
in the label doesn't get parsed correctly when the label contains special characters, such as "comma" an "double quotes". Usingthis.value
as the label, seems to solve the issue. Additionally, the (id) can be removed from being displayed to the end users by removing theid
inside the brackets at the end of the string inassets/js/autocomplete_delux.js
by replacing:this.element = $( '<span class="autocomplete-deluxe-item">' + item.label + "</span>" );
with:
// Use value as label because of the double quote and comma character encoding. // Then remove the entity id in bracketsfrom the end of string. const noLabelId = this.value.replace(/[ ]\([^()]+\)(?=[^()]*$)/gi, ""); this.element = $( '<span class="autocomplete-deluxe-item">' + noLabelId + "</span>" );
- Open on Drupal.org āCore: 10.0.7 + Environment: PHP 8.1 & MySQL 8last update
over 1 year ago Waiting for branch to pass - šŗšøUnited States caspervoogt
For what it's worth, I ran into this ("There are no taxonomy terms matching "my new term name") on D10 and the patch from #6 didn't help.
- šøš¦Saudi Arabia martins.bruvelis Thuwal
Comment #24 š Autocomplete deluxe widget doesn't work for multiple entity reference field when you add new terms and some terms are existing Needs review caspervoogt ā
Is the issue still present if you use the plain diff patch from Merge Request !10 mergeable?
- šŗšøUnited States caspervoogt
@martins.bruvelis I just tested that plain diff and get the same error; 'There are no taxonomy terms matching "testingignore" when I tried adding a new term called "testingignore" using the Autocomplete widget. My widget is configured to allow new terms.
- š§šŖBelgium dieterholvoet Brussels
This seems to work as long as you enable both the Allow new terms widget option and the Create referenced entities if they don't already exist field option provided by Drupal core. I suggest we get rid of the Allow new terms widget option since it's redundant.
- Status changed to Needs work
about 1 year ago 10:26am 13 November 2023 - š¦šŗAustralia almunnings Melbourne, š¦šŗ
MR10 has helped fix errors with an entity reference taxonomy term with brackets in the title, in my usage.
- Status changed to Needs review
about 1 year ago 12:08pm 29 December 2023 - šŗš¦Ukraine sickness29
I have removed setting from module and only left it in element to pass entity reference's setting there.
Tested adding both existing and new terms on clean Drupal and seen no issues - š§šŖBelgium borisson_ Mechelen, š§šŖ
@sickness29, I think it would be better to add to the already open Merge Request, so we can clearly see the change you've made?
- šŗš¦Ukraine sickness29
Hi @borisson_
I am fixing the issue described in task and it is "widget does not work when you add new terms and some terms are existing".
When you apply this patch the issue is non existent as it was not obvious for people that there is second setting in widget to allow creating new items.
This is also confirmed #27, so the only issue is odd setting, removed it leaving only the default one which comes from entity reference field.The merge request has nothing to do with my fix. I think it tries to fix another issue which are "widget does not work when you try to resave field with label with brackets" which is fixed here https://www.drupal.org/project/autocomplete_deluxe/issues/3350796#commen... š Using terms with brackets in their name breaks Autocomplete Deluxe Needs review
- Merge request !14Removed option to create new terms; use entityreference's option instead ā (Merged) created by sickness29
-
sickness29 ā
committed 9ce9e512 on 2.0.x
Issue #3053986 by sickness29, manuga, aditya.ghan, rksyravi, Rajab...
-
sickness29 ā
committed 9ce9e512 on 2.0.x
- Status changed to Fixed
9 months ago 2:55pm 6 May 2024 Automatically closed - issue fixed for 2 weeks with no activity.
- š«š·France dqd London | N.Y.C | Paris | Hamburg | Berlin
After reading down how this issue has evolved I am pretty sure that some confusion in this issue here with mixed reports and patch attempts broke Automcomplete Deluxe because it now only saves one single term, no matter which setting has been chosen. You can see them all in the form but after saving and re-opening only the last term keeps being set.
- Assigned to Rajab Natshah
- Status changed to Needs work
5 months ago 5:21pm 9 September 2024 -
rajab natshah ā
committed 8981f3b8 on 2.0.x
Revert "Issue #3053986: Autocomplete deluxe widget doesn't work for...
-
rajab natshah ā
committed 8981f3b8 on 2.0.x
- šÆš“Jordan Rajab Natshah Jordan
Reverted the committed logic.
Needs more work and more testing before re-committingā Multiple Entity Reference Field with Mixed Existing Terms ( This is OK )
ā But Multiple Entity Reference Field with Mixed New Terms ( Which taxonomy will use to create the new term? ) - Issue was unassigned.
- Status changed to Closed: won't fix
4 months ago 1:12pm 15 September 2024 - šÆš“Jordan Rajab Natshah Jordan
Decided to close this issue as won't fix
ā Multiple Entity Reference Field with Mixed Existing Terms ( This is OK )
ā But Multiple Entity Reference Field with Mixed New Terms ( Which taxonomy will use to create the new term? )
that will not be logical