ERROR :: Fatal error: Call to a member function addCacheTag() on a non-object in public_html/app/code/core/Mage/Catalog/Model/Observer.php on line 215
you can find the lines
241 :: $menuBlock->addModelTags($categoryModel);
215 :: $block->addCacheTag(Mage_Catalog_Model_Category::CACHE_TAG);
here is not error fixing place in block class is
"Mage_Page_Block_Html_Topmenu"
you can find getHtml function in that you can see
Mage::dispatchEvent('page_block_html_topmenu_gethtml_before', array(
'menu' => $this->_menu
));
replace above code to below code
Mage::dispatchEvent('page_block_html_topmenu_gethtml_before', array(
'menu' => $this->_menu,
'block' => $this //add this line
));
you can find the lines
241 :: $menuBlock->addModelTags($categoryModel);
215 :: $block->addCacheTag(Mage_Catalog_Model_Category::CACHE_TAG);
here is not error fixing place in block class is
"Mage_Page_Block_Html_Topmenu"
you can find getHtml function in that you can see
Mage::dispatchEvent('page_block_html_topmenu_gethtml_before', array(
'menu' => $this->_menu
));
replace above code to below code
Mage::dispatchEvent('page_block_html_topmenu_gethtml_before', array(
'menu' => $this->_menu,
'block' => $this //add this line
));
Comments
Post a Comment