I just upgraded from Magento CE v1.7 to v1.8, the top menu won’t load, and the errors are:
Fatal error: Call to a member function addCacheTag() on a non-object in /app/code/core/Mage/Catalog/Model/Observer.php on line 215
Fatal error: Call to a member function addModelTags() on a non-object in /app/code/core/Mage/Catalog/Model/Observer.php on line 241
Suggests modifying Observer.php and commenting out:
// 215 ($block->addCacheTag(Mage_Catalog_Model_Category::CACHE_TAG);)
// 241 ($menuBlock->addModelTags($categoryModel);)
This works, but I don’t know what it affects? Also, I’d rather not have to modify the core.
Another suggestion was to add, “ ‘block’ => $this “ in /app/code/core/Mage/Page/Block/Html/Topmenu.php
But, I already have this line… so I’m at a loss.
Can someone help with with what changed in v1.8 that this doesn’t work, and perhaps a way to fix it? Is it because the site uses custom code?