Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    1. To be certain, not functioning properly in which way? Submitting the original form and leading to the search results page? something else?
    2. I’m seeing javascript errors because it’s not managing to find some of the javascript libraries that our Instantsearch templating relies on, like wp-util.js: “Uncaught ReferenceError: wp is not defined”.

    Do you have some javascript cache optimizations going on with something like WP Rocket or similar?

    Thread Starter Standard Cold Pressed Oil

    (@coldpressedoil)

    1. Auto suggestion is working properly, but I am trying to say that when i type something and hit enter, it is not going to search result page, it happens only for the home page.
    2. I am using WP Rocket as well as Perfmatters plugin for cache.

    Thanks for your prompt reply.

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    1. I’m looking at Algolia Discourse threads around the topic of submit on enter key press, and am seeing results like https://discourse.algolia.com/t/how-to-submit-the-autocomplete-form-to-refine-instantsearch/17187 where they outline some eventListener code like I’ve listed below, to handle submitting. You’ll need to adjust to fit your search form.
    2. Can you try adding https://standardcoldpressedoil.com/wp-includes/js/wp-util.min.js to exclusion for any javascript based optimizations you’ve made

    document.querySelector('#searchform input').addEventListener('keydown', function(event) {
      if (event.keyCode === 13) {
        event.preventDefault();
        document.querySelector('#searchform').submit();
      }
    });
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Search Results Not Working in algolia plugin’ is closed to new replies.