Magento Forum

   
Fatal error: Call to a member function getId() on a non-object in app/code/core/Mage/Adminhtml/Block/Page/Menu.php on line 80
 
usaphotosupply
Jr. Member
 
Total Posts:  2
Joined:  2012-12-16
 

Here is the code causing me a problem...whats wrong??? I installed a theme for the admin. refreshed cache and it looked great, i went to log out and log back in and recieved “Fatal error: Call to a member function getId() on a non-object in app/code/core/Mage/Adminhtml/Block/Page/Menu.php on line 80”

Lines 65-89…

public function getCacheLifetime()
{
    
return 86400;
}

/**
 * Get Key pieces for caching block content
 *
 * @return array
 */
public function getCacheKeyInfo()
{
    $cacheKeyInfo 
= array(
        
'admin_top_nav',
        
$this->getActive(),
        
Mage::getSingleton('admin/session')->getUser()->getId(),
        
Mage::app()->getLocale()->getLocaleCode()
    );
    
// Add additional key parameters if needed /
    
$additionalCacheKeyInfo $this->getAdditionalCacheKeyInfo();
    if (
is_array($additionalCacheKeyInfo) && !empty($additionalCacheKeyInfo)) {
        $cacheKeyInfo 
array_merge($cacheKeyInfo$additionalCacheKeyInfo);
    
}
    
return $cacheKeyInfo;
}

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