nexcess / magento-turpentine

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

Compatibility with Mirasvit Sphinx Search #630

Closed burner1024 closed 9 years ago

burner1024 commented 10 years ago

I got a store with Mirasvit Sphinx Search. When Turpentine is installed, it would show default search instead. Any insight on how I can fix it?

burner1024 commented 9 years ago

Great job.

On Fri, Jun 26, 2015 at 11:31 PM, Aric Watson notifications@github.com wrote:

Closed #630 https://github.com/nexcess/magento-turpentine/issues/630.

— Reply to this email directly or view it on GitHub https://github.com/nexcess/magento-turpentine/issues/630#event-341337956 .

Ilya.

aricwatson commented 9 years ago

Apologies, we'll try to help although we can't promise that Turpentine will work well with all 3rd party extensions. What version of Turpentine, Varnish and Magento are you using? What debugging have you tried?

burner1024 commented 9 years ago

Sorry, it will a year soon. I've no idea by now, except all versions were the latest at the time of writing.

On Sat, Jun 27, 2015 at 12:00 AM, Aric Watson notifications@github.com wrote:

Reopened #630 https://github.com/nexcess/magento-turpentine/issues/630.

— Reply to this email directly or view it on GitHub https://github.com/nexcess/magento-turpentine/issues/630#event-341371518 .

Ilya.

aricwatson commented 9 years ago

I apologize that it took us so long to get back to you originally.

We're happy to help debug issues with 3rd party extensions, but we'll need additional information. If you still need help with this, feel free to reply and we'll re-open this issue.

samm-git commented 9 years ago

I been able to resolve this. Problem is very simple:

  1. Mirasvit search block is not using its own block, but instead replacing content of the top.search block provided by system.
  2. With ESI this would not work, probably because this block has it own content, so replacement not affecting already rendered magento search block. This causing default search form instead of one from Mirasvit.

To fix this i did such changes:

  1. In my template search config (/app/design/frontend/rwd/custom/layout/catalogsearch.xml) i repaces line
<block type="core/template" name="top.search" as="topSearch" template="catalogsearch/form.mini.phtml"/>

With line

<block type="searchautocomplete/form" name="top.search" as="topSearch" template="mst_searchautocomplete/default.phtml"/>

This will force to use correct block instead of default one. Also to render it correctly you will have to add css (it is also added dynamically without varnish:)

<reference name="head">
    <action method="addItem"><type>skin_css</type><name>css/mirasvit/searchautocomplete/rwd.css</name></action>
</reference>
aricwatson commented 9 years ago

Thanks @samm-git for letting us know about this fix, I'm going to add it to the documentation!

tdgroot commented 8 years ago

@samm-git Thanks for the solution, the fix worked for us!