Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Navigation not working because Blocks HTML output cache is enabled
 
muk_t
Sr. Member
 
Total Posts:  226
Joined:  2012-07-24
 

Hi All,
I am using Magento Enterprise edition ver. 1.12.0.0.

My navigation menu styling working completely wrong If I have Blocks HTML output cache enabled.
If I disable this cache everything works fine

Due to this caching I am also unable go get current page url correctly using this code

$_currentUrl Mage::helper('core/url')->getCurrentUrl();

I also used following code
app/code/local/Mage/Catalog/Block/Navigation.php

protected function _construct()
    
{
        $this
->addData(array(
            
'cache_lifetime'    => false,
            
'cache_tags'        => array(Mage_Catalog_Model_Category::CACHE_TAGMage_Core_Model_Store_Group::CACHE_TAG),
        ));
    
}

I replaced with this

protected function _construct()
    
{
    }

but no change is there.I also refreshed all the caches.

Please someone help me.
Thanks.

Solution

The topmenu.php file was at this “/app/code/core/Mage/Page/Block/Html” location.

After commenting following lines in “/app/code/local/Mage/Page/Block/Html” location problem solved.

public function _construct()
{
$this->_menu = new Varien_Data_Tree_Node(array(), ‘root’, new Varien_Data_Tree());

/*
$this->addData(array(
‘cache_lifetime’ => false,
‘cache_tags’=>array(Mage_Catalog_Model_Category::CACHE_TAG, Mage_Core_Model_Store_Group::CACHE_TAG),
));
*/
}

 
Magento Community Magento Community
Magento Community
Magento Community
 
roshanlal
Member
 
Avatar
Total Posts:  33
Joined:  2010-01-15
india
 

Did you solve this issue.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top