Support » Plugin: WP Search with Algolia » The search isn’t working in the product page
The search isn’t working in the product page
-
Hi,
the search is working in all the pages but in the single product page, not.
Any idea?Thanks.
Davide
-
Hi @davidem82
Can you provide a link to the site in question? Shouldn’t be any sort of restrictions, but I’m wondering if perhaps some sort of javascript error is occurring on just the single product pages to prevent the results from showing like needed.
Hey Davide,
Have you done any sort of template customizations or perhaps optimization of some sort regarding script loading?
On a single product page, I’m seeing this error in the browser developer tools console:
Uncaught TypeError: wp.template is not a function
fope-bracelet-woman-small-collection-in-white-gold.html:3127:33This tells me that either things are trying to run too early, or something isn’t quite available yet, especially around the WordPress utility script that provides the
wp.template
function.This isn’t anything to do with the products displayed or how, this is in regards to the javascript libraries loaded with the page to make the autocomplete work.
So this would be any sort of caching plugins that let you dictate when script files are loaded, or any sort of combining of the files into fewer requests. If you’ve done customization of the templates themselves, there would be an “algolia” folder in your theme folder with the customized copies.
There isn’t really any edit to the plugin we can do on our end without ending up affecting everyone. I am curious if it would all work again if you returned back to the defaults. You should be able to just temporarily rename the
algolia
folder in the theme, to anything else, and those would no longer get picked up.We have the why, regardless, just a matter of why it’s only error-ing in some places.
Hi Micheal,
there is a very strange thing. I didn’t nothing and now it works!
Bah!Thanks for your support!
Welcome.
- You must be logged in to reply to this topic.