- Issue created by @mahde
- π¨π¦Canada mahde Vancouver
The actual issue was that the field title has the word "title" in it and I found that there is a statement in the linkit.autocomplete.js file:
if (titleSelector.replace('-title', '') !== linkSelector.replace('-uri', '')) { return false; }
Which is replacing the '-title' and because my field has '-title' so it's replacing the first string found and therefore the statement is false and autocomplete will stop working.
I added a new function to replace only the last occurrence for '-title' to avoid this problem and now it works.
Hope to add this fix to the module to avoid this issue when any field has 'title' string in the label. - πΊπ¦Ukraine deulenko
I encountered the same issue on Drupal 10.4.6, but the existing patch doesnβt appear to work with this version. Iβve attached a new patch that ensures compatibility with Drupal 10.
- Merge request !106Issue #3447685 by mahde, deulenko: Linkit field doesn't work in nested... β (Open) created by mark_fullmer
- πΊπΈUnited States mark_fullmer Tucson
I've converted the patch to a merge request so we can see what this does in automated test coverage. On the surface, the changes involved here look like they could have unintentional side effects.
- πΊπΈUnited States bkosborne New Jersey, USA
I'm confused about the patch in #4 as it is completely different from the patch in #3.
It sounds like the root of this problem is that the logic for finding the title field is flawed. There's other issues with this logic too that I discovered in π Field widget broken if there's multiple link fields, one without link text enabled Active . I created an MR in there to cover those issues as well as the issue here. I think this can be closed as a duplicate of that (I realize this issue was open first, but I'm not sure what's going on with the MR/patch here, and my issue covers additional issues. I'll carry over the issue credits to that one).