So, we put the block "recently viewed" in our product. Everything seems to be looking good at first, but now I see strange errors related to null layouts. If I turn off caching, it works fine, but with full page caching it doesn't work when $ this-> getColumnCount () is called; in the template.
What I did for a recent view on the product page was:
in the .xml directory inside the product_view directory content block:
<block type="reports/product_viewed" name="reports.product.viewed" as="recently_viewed" template="reports/product_viewed.phtml">
<action method="setColumnCount"><columns>4</columns></action>
<action method="setItemLimit"><type>recently_viewed</type><limit>4</limit></action>
</block>
in the template file: catalog / product / view.phtml:
<?php echo $this->getChildHtml('recently_viewed') ?>
all load for the first time, but then if I click on another type of product, reload the page where it will fail. I traced the error to the class: Mage_Page_Helper_Layout.
getCurrentPageLayout() :
$this->getLayout()->getBlock('root')
$this- > getLayout null, getBlock .
, , .