Hello
J'ai mis à jour mon site de 8.9.16 à 9.0.2
En passage au d9 tous les champs autocomplete du backoffice n'est plus fonctionnel
J'ai eu cet erreur au console
drupal.js?v=9.2.0:16 Uncaught TypeError: value.autocomplete is not a function
at HTMLInputElement. (jquery.autocomplete.js?v=9.2.0:346)
at Function.each (jquery.min.js?v=3.6.0:2)
at Object.attach (jquery.autocomplete.js?v=9.2.0:325)
at drupal.js?v=9.2.0:27
at Array.forEach ()
at Object.Drupal.attachBehaviors (drupal.js?v=9.2.0:24)
at drupal.init.js?v=9.2.0:29
at HTMLDocument.listener (drupal.init.js?v=9.2.0:17)
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | value-autocomplete-not-function-3220334-3.patch | 790 bytes | fathima.asmat |
Issue fork search_autocomplete-3220334
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
fathima.asmat commentedI'm having similar issues as well. It seems like Drupal Jquery UI is deprecated in D9.2.x and Drupal has introduced new changes to the way the autocomplete works. Perhaps, it needs updating for this module aswell.
https://www.drupal.org/node/3156376
Comment #3
fathima.asmat commentedConsidering the changes applied to core libraries here (https://git.drupalcode.org/project/drupal/-/blob/9.2.x/core/core.librari...), the module's library_info_alter() hook (https://git.drupalcode.org/issue/search_autocomplete-3220334/-/blob/2.x/...) needs to be updated to match the 9.2 equivalent.
The provided patch should attach the module's JS to the end of the core autocomplete assets after all jquery.ui packages are included.
Comment #4
marcoka commentedNice, thank you, i will test that patch now.
I applied it, works and also autocomplete works again. I will push that vom local to live now and test more.
Seems solid, the patch is not very complicated so i vote RTBC.
Comment #5
devoleksiy commentedThe patch works as expected.
Don't forget to clear the cache after applying)
Comment #6
rahma_fakhfekh commentedTop, the patch works perfectly
Thank you very much
we need to clear the cache after applying the patch
Thanks again :))))))
Comment #7
fathima.asmat commentedI'm not able to add the auto test to patch as the custom parameters do not provide the actual version of the module that this patch should be applied for. @dom, given that the patch is now applied by a few users and confirmed to be working, is it possible for you to review and commit to the module core if you are happy?
Comment #8
msantin0 commentedthe patch works perfectly
Thanks!
Comment #9
lois.chabrand commentedThanks, the patch is working great.
Comment #10
rgristroph commentedThis module did not work for me until I applied this patch. I looked at the code change and it makes sense to me that adding that "weight" would make it work. I recommend merging this one.
Thanks for figuring this out !
Comment #11
thanksneco commentedThis patch works perfectly! Thank you so much! I would recommend this get added into the module as well.
Comment #12
marassa commentedWorks for me.
Comment #13
ConradFlashback commented#3 works please commit.
Comment #14
opdavies#3 also works for me, after spotting this issue with Search Autocomplete 2.0.1, and Drupal 9.3.3.
Comment #16
dom. commentedThanks a lot guys !
Comment #18
frank.dev commentedI have the following observation about the problem described here:
On a website managed with Composer, the problem exists for anonymous visitors but not for logged-in visitors.
On a website without Composer, the module works flawlessly for all visitors.
Both websites use the same version of Drupal and Search Autocomplete.
The patch fixes the problem.
Can anyone confirm this observation?
Comment #19
dom. commentedI wonder why I did not release a new version after that one. It is a critical blocker with current version.
Better late then never. Sorry for this.