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)

Command icon 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

    rahma_fakhfekh created an issue. See original summary.

    fathima.asmat’s picture

    Issue tags: +9.2.0 release notes

    I'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

    fathima.asmat’s picture

    Status: Active » Needs review
    StatusFileSize
    new790 bytes

    Considering 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.

    marcoka’s picture

    Nice, 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.

    devoleksiy’s picture

    The patch works as expected.
    Don't forget to clear the cache after applying)

    rahma_fakhfekh’s picture

    Top, the patch works perfectly
    Thank you very much
    we need to clear the cache after applying the patch
    Thanks again :))))))

    fathima.asmat’s picture

    Status: Needs review » Reviewed & tested by the community

    I'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?

    msantin0’s picture

    the patch works perfectly
    Thanks!

    lois.chabrand’s picture

    Thanks, the patch is working great.

    rgristroph’s picture

    This 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 !

    thanksneco’s picture

    This patch works perfectly! Thank you so much! I would recommend this get added into the module as well.

    marassa’s picture

    Works for me.

    ConradFlashback’s picture

    #3 works please commit.

    opdavies’s picture

    #3 also works for me, after spotting this issue with Search Autocomplete 2.0.1, and Drupal 9.3.3.

    • Dom. committed ca1a855 on 2.x
      git commit -m 'Issue #3220334 by fathima.asmat: value.autocomplete is...
    dom.’s picture

    Status: Reviewed & tested by the community » Fixed

    Thanks a lot guys !

    Status: Fixed » Closed (fixed)

    Automatically closed - issue fixed for 2 weeks with no activity.

    frank.dev’s picture

    I 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?

    dom.’s picture

    I 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.