So I've moved my store up to Everything is looking good except for the Blocks HTML Cache.

I'll try to explain this as best I can.

I have the common setup of using a static block calling a script to display sub-categories within a parent category. Something similar to this tutorial

It's always worked without any hitches...Until I upgraded. The issue I'm seeing is that any category pages using this static block script to display sub-categories are failing, resulting in all of these categories displaying the same cached sub-categories page. It's like it's not re-caching and just serving up the same content to all of these pages. It means customers can't navigate through to the correct layers of the site because any Category using the sub-category script will see the same cached layout with incorrect sub categories.

I've run a Mage cleanup script to reset any strange permission issues but with no avail. As a temporary fix so my customers can actually browse the site, I've disabled the Blocks HTML Cache which fixes the issue straight away. So clearly the issue is with the Cache not serving up the content correctly or in fact, realising that a re-cache is required. How do I go about fixing this? Is there a more efficient way of serving sub-categories within parent categories that do no list individual products?

Here is the code I am using to display sub categories in a nice grid (Pastbin):

<div class='category-grid'>
    $layer = Mage::getSingleton('catalog/layer');
    <ul class="products-grid">
    foreach ($_categories as $_category):

        $_category = Mage::getModel('catalog/category')->load($_category->getId());

        $products = Mage::getModel('catalog/product')->getCollection()
                                                ->addAttributeToSort('price', 'asc')

        $prod = $products->getFirstItem();
        $lowestProductPrice = $taxHelper->getPrice($prod, $prod->getPrice(), true, null, null, null, null, false);
        $formattedPrice = Mage::helper('core')->currency($lowestProductPrice, true, false);

             $_img = ($_category->getThumbnail()) ? "/media/catalog/category/".$_category->getThumbnail() : "/media/placeholders/small.jpg";
             $_img = Mage::getBaseUrl() . $_img;
                    <li class="item <?php if(($i-1)%$_columnCount==0): ?> first<?php elseif($i%$_columnCount==0): ?> last<?php endif; ?>">
                        <a href="<?php echo $_category->getUrl(); ?>" title="<?php echo $_category->getName(); ?>" class="product-image">
                            <?php if($_img):?>
                                <img src="<?php echo $_img; ?>" alt="<?php echo $_category->getName();?>" />
                            <?php else:?>
                                <?php echo $_category->getName();?>
                            <?php endif;?>
                        <div class="product-detail">
                            <h2 class="product-name"><a href="<?php echo $helper->getCategoryUrl($_category); ?>" title="<?php echo $this->stripTags($_category->getName(), null, true) ?>"><?php echo $_category->getName(); ?></a></h2>

    <?php endforeach; ?>
<?php else: ?>
<p><?php echo $this->__('No categories found.'); ?></p>
<?php endif ?>

1 Answer 1


You may well be experiencing the static block cache bug introduced with 1.9.2, although reported as fixed in I have still experienced caching problems with static blocks. More information available here

Magento static block display issues

A good fix/workaround for this bug is this module


  • That's great thanks for the link. I will implement the fix on my staging and see how it runs.
    – Jake
    Sep 14, 2015 at 15:24
  • 2017 latest version so far is and yet the issue still persists Nov 16, 2017 at 9:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.