GordonLesti / Lesti_Fpc

Simple Magento Fullpagecache
https://gordonlesti.com/lesti-fpc-documentationversion-1-4-5/
Other
358 stars 159 forks source link

Block doesn't get replaced on cache hits -- placeholder text appears in output instead #304

Open doctea opened 7 years ago

doctea commented 7 years ago

I'm using the Amasty_Shopby (ImprovedLayeredNavigation) module and noticing a problem with the display of the 'Rating' widget on reloaded pages (block correctly appears when first loaded, or when rendered from a non-cached request).

Problem is that on a page reload, the FPC placeholder text appears in the output, eg "", instead of the desired HTML label.

From digging into the Amasty code, it looks like HTML label that should appear instead of the placeholder is generated by an Amasty method that instantiates a block and renders a template. It seems this is breaking the caching somehow...

I'm also going to open this as a ticket with Amasty support, in case this is something that they are more suited to fix.

doctea commented 7 years ago

Doing some more googling for my notes and came across this, from 2015: https://github.com/elastera/Elastera_AmastyLesti

Any ideas if this is still working/useful?

I've just tested it on development site, and it hasn't fixed the caching issue I describe above. Don't know if it still fixes what it claims to.

doctea commented 7 years ago

Have received a patch from Amasty tech support that works around this issue -- not sure if I'm allowed to share it here though.

Basically it involves rewriting the Catalog_Layer_Filter_Rating class's getLabelHtml() function to output the rating HTML directly, instead of instantiating and calling toHtml on a block+template.