nexcess / magento-turpentine

A Varnish extension for Magento.
GNU General Public License v2.0
519 stars 253 forks source link

Extension Incompatible: Search Autocomplete and Suggest #607

Closed ADDISON74 closed 8 years ago

ADDISON74 commented 10 years ago

I am using this extension, which in my opinion is providing good search results and it is free:

http://www.magentocommerce.com/magento-connect/search-autocomplete-and-suggest-2.html

Using default.vcl provided by Varnish installation this is working great, but page time is 400 ms. Using Turpentine's VCL file I get 6 ms but this extension stop working.

Please I need a solution asap.

ADDISON74 commented 10 years ago

I presume all search based on AJAX are affected without a rule tag. Anyone?

ADDISON74 commented 9 years ago

After 3 months from reporting no solution to skip ajax for search box? What a shame!

theycallmepepper commented 9 years ago

What frontend URIs are used in this extension? Or is there a parameter in the query string that is used? If you can find a specific parameter in the query string you can add it to the GET parameters or if theres a specific url that the ajax request is submitted to you can add it to the URL blacklist.

ADDISON74 commented 9 years ago

Here is the template I am using:

http://www.templatemonster.com/demo/52023.html

Search autocomplete and suggest extension is related to Search box middle top. Please use the search box to get instant searches. This is not working with Turpentine. Any thoughts based on your basic solution?

aricwatson commented 9 years ago

Taking a look at this, the extension does an ajax call to this URL:

http://livedemo00.template-help.com/magento_52023/searchautocomplete/suggest/result/?q=plush

So I'd suggest starting by blacklisting searchautocomplete in the config and see how things perform.

ADDISON74 commented 9 years ago

I did this before but it did not work. I tried also to separate the search box from header with no luck.

aricwatson commented 9 years ago

What is the specific error/issue you're seeing? Is it always returning the same cached result no matter what the query?

ADDISON74 commented 9 years ago

Actually the predictive search box is not showing any results in a list. The same thing is happening know with out of the box Magento 1.9.2. This version has a predictive search enabled by default. After enabling Turpentine there is no result list coming.

aricwatson commented 9 years ago

I see... I think the proper approach would be to figure out if the ajax calls are being made by the plugin. Then assuming the calls are being made and that Varnish is interfering with the results being returned turn on debugging and see you can look at the logs and figure out why those calls aren't working with Varnish/Turpentine.

My guess is that the calls aren't being made for some reason, since if the ajax call URLs are properly blacklisted, then they shouldn't be getting cached by varnish at all. Do you see any javascript errors on the page?

aricwatson commented 9 years ago

Closing for lack of feedback, but feel free to reply if the issue is still occurring and you were able to track down any javascript errors that might help us find out how to make the extension work with Turpentine.

ADDISON74 commented 9 years ago

Sorry for my late reply. There were no JavaScript errors on the page. You can check by your own too. Magento 1.9 comes with a predictive search box by default. Just install Magento, Sample date, Turpentine, then enable/disable Turpentine. When it's disabled search box is predictive.

aricwatson commented 9 years ago

We'll investigate!

aricwatson commented 9 years ago

OK, looked into this quite a bit. It's difficult to be sure because it seems that the base magento search autocomplete is a little inconsistent. For example, on a server without varnish or turpentine (but with base CE install with sample data), a search for "linen" will not autocomplete until after a regular search has been done for the term.

Given those parameters, I've verified that the auto-complete does work on Magento CE 1.9, with Varnish 3, current devel branch of Turp and the sample data. Keep in mind that the ajax queries used for the autocomplete are subject to the same caching issues as regular pages, so if the cache isn't warmed for a particular query it may take a longer time for the autocomplete to return and appear.

ADDISON74 commented 9 years ago

I followed your steps and it is working. If I enter "delancy" list is coming. I will try to understand from where these words are coming. If I enter "nolita" list is not coming.

Could you please check if search box is cached? Before restarting Varnish service I search for "delancy". This word appeared in the search box on the next page I visited which was not OK.

ADDISON74 commented 8 years ago

Auto-suggest search box works in Magento in this way.

1) The string you will search must be recorded in Catalog -> Search.

2) At least 1 "Number for results" and 1 "Number of Uses" is needed in order to see it working.

3) Select to Yes "Display in Suggested Terms"

4) Re-index "Catalog Search Index"

Just do the following steps above and you will get suggestions immediately. It is not a matter of waiting. I am checking right now if this container is cached by Turpentine. You can investigate it too. Thank you.

miguelbalparda commented 8 years ago

We are aware of this issue, please keep in mind we prioritize issues where multiple users are affected.

ADDISON74 commented 8 years ago

I understand, I hope you prioritize on this issue #895 which affects all users.

ADDISON74 commented 8 years ago

I will close this issue for opening other one with more details and extended.

drk1 commented 7 years ago

Hi, I'd just give you my feedback regarding a similar issue I had on CE 1.7.0.2 with MageWorx SearchSuite. The autocomplete block in header wasn't displayed after installing Varnish/Turpentine. The solution was, as suggested here, to add "autocomplete" to the config blacklist. Then worked just like a charm!