Pergunta

The site I am working with uses an image gallery/banner rotater. The script for this is contained in the head.phtml file. It looks like all pages are reading it except those that are actually categories set up to display a static block only.

<script type="text/javascript">
        jQuery.noConflict();
        jQuery(document).ready(function() {
        jQuery(".navigat li:first").css("background","none");
            jQuery('.slideShow').slideShow({
                interval: 5
            });
             var body_h = jQuery('body').height();
             //alert(body_h);
             body_h = body_h-58;

             jQuery('.imagescont').height(body_h);
            });
    </script>

The admin is set to allow full page caching: Location: System/Configuration, using Default Config Left Menu: System Heading: External Full Page Cache Settings

When Cache Storage Management via System/Cache Management is turned off all pages read the gallery script and it functions as expected.

When Cache Storage Management via System/Cache Management is turned on then any page that is created via a category in admin set to use a static block fails. In this scenario, the source code shows that the gallery script is not present in the head.

Steps tried so far: Clear the cache completely after turning on Cache Storage Management via System/Cache Management. Remove gallery script from head.phtml and add to header.phtml again clearing the cache and waiting up to 10 minutes in case the cart needed time to cycle the changes through. Adding the script to the static block being tested. (No that does not make sense but I still wanted to rule it out.)

Does anyone have any ideas as to why this would be the case?

Foi útil?

Solução

You will need to disable block-level caching for the affected block by setting its cache_lifetime to 0 (explicit), or you will need to add the dynamic data to its cache key.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a magento.stackexchange
scroll top