0

I'm using Algolia search with the Magento AlgoliaSearch integration (https://github.com/algolia/algoliasearch-magento).

Now I'm facing the problem, when hitting enter in the autocomplete search as long as there are any suggestions, I receive an JS error on loading the instant search results page.

At the moment the autocomplete search returns that there are no results found, the instant search results load correctly and I'm also able to refine the search/perform a search on other terms in the searchbox on the instant results page without any issues.

I've already found out, that the problem is loading the template that is done in this line (instantsearch.js: 28)

var wrapperTemplate = algoliaBundle.Hogan.compile($('#instant_wrapper_template').html());

enter image description here

As long as the autocomplete search returns any results, $('#instant_wrapper_template').html() is undefined.

From the moment on the autocomplete search has no results the correct content contained in $('#instant_wrapper_template').html() (defined in algoliasearch-magento/app/design/frontend/base/default/template/algoliasearch/instantsearch/wrapper.phtml) is loaded.

I'm not sure if I'm missing something, but I hope that someone of you can help me.

1

The issue is further handled on GitHub - maybe it helps someone.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.