Closed amrutadotorg closed 3 years ago
I'm not sure if my solution is a proper one, but following the instruction on https://www.algolia.com/doc/guides/building-search-ui/installation/js/ I added:
to the head, which solved the issue.
I have the same problem
there is a problem with the condition for the load scripts. if we use only search page without autocomplete - we get this error. Algolia_Template_Loader::enqueue_autocomplete_scripts() - started only if enable autocomplete. but the script for the search page is loaded in the same place
I have not encountered this in either my local development environment, nor on my own personal blog where I run WPSWA as a "remote" testing environment to ensure that the zip delivered from WPORG functions as expected.
My local development environment is running PHP 8, WordPress 5.8, and the Twenty Twenty-One theme.
My personal blog is running PHP 7.4.21, WordPress 5.8, and the Twenty Twenty theme.
I have no customizations in either environment, and use the default templates delivered with the plugin.
I tested autocomplete, PHP based search, and instantsearch, without issue in both environments.
From any page in my personal blog, if I enter algoliasearch
in the browser console, I see it returns the function.
From any page in my personal blog, if I enter algoliaAutocomplete
in the browser console, I see it returns the function.
On the search results page, if I enter instantsearch
in the browser console, I see it returns the function.
@uptimizt so that I understand, you are saying that if you have instantsearch.js enabled, but autocomplete disabled, then you encounter the issue?
@amrutadotorg do you also have instantsearch.js enabled, but autocomplete disabled?
@richaber yes, if I enable a search page with Instantsearch.js and autocomplete, everything is fine.
but, if I disabling autocomplete
I get the error on the search page and the search page stops working
Thank you for verifying that @uptimizt.
I've tagged 2.0.1 here in Github, and am working on pushing it out to WPORG's SVN repo.
2.0.1 update has been pushed to WPORG
Tested on my personal blog, and it appears to resolve the issue if I enable instantsearch and disable autocomplete.
Hi, after upgrading the plugin to 2.0.0 In the console I'm getting the error "Uncaught ReferenceError: algoliasearch is not defined" my page is www.amruta.org I'm using default instantsearch.php template.
If possible please guide how to fix the issue.
Option Use Algolia in the backend works fine.