Support » Plugin: WP Search with Algolia » Uncaught ReferenceError: algoliaAutocomplete is not defined

  • Resolved matchlessweb

    (@matchlessweb)


    Hey there, at one point this plugin was working on my site, but now I’m having issues related to this console error:

    Uncaught ReferenceError: algoliaAutocomplete is not defined
        at Object.<anonymous> ((index):376)
        at Function.each (jquery.js:2)
        at HTMLDocument.<anonymous> ((index):373)
        at i (jquery.js:2)
        at Object.fireWith [as resolveWith] (jquery.js:2)
        at Function.ready (jquery.js:2)
        at HTMLDocument.J (jquery.js:2)

    I originally thought this error might only appear on pages where there’s not a search bar to be found (such as on my homepage: https://matchlessweb.com/). But now I see this console error is also appearing on pages where there is an active sidebar widget. Autocomplete is not functioning now. Any idea what might be happening? Love this plugin by the way!

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Richard Aber

    (@richaber)

    Howdy @matchlessweb,

    I just visited the URL you referenced, and I’m not receiving the described error.
    Is it possible that this is cache related (Cloudflare, CDN, browser)?

    matchlessweb

    (@matchlessweb)

    Hey Richard, thanks for the reply. I just found the issue and it had nothing to do with WP Search with Algolia.

    In my attempts to optimize my site for fast page loads, I forgot that I had attempted to delay the execution of all Javascript associated with WP Search with Algolia by using the “Flying Scripts” plugin (https://wordpress.org/plugins/flying-scripts/). It seems delaying the execution of this plugin’s JS breaks the autocomplete functionality of WP Search with Algolia, which totally makes sense. I reversed my Flying Scripts configuration for this plugin, and normal functionality has returned so all is well now.

    I had originally attempted delaying the JS execution in hopes pages using the search widget wouldn’t be slowed down by having to parse that JS on page load.

    Plugin Author Michael Beckwith

    (@tw2113)

    The BenchPresser

    Good sleuthing, and good to know it wasn’t specific for something recently released here.

    Let us know if you need anything else.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.