0
votes

When I run the Export All Products Profile in magento I get this error:

Fatal error: Class 'Varien_Object_Cache' not found in /home/macweare/public_html/app/Mage.php on line 312

Image of the error

I have flushed both the Magento cache and the storage cache, and the problem still persists. I am on Magento 1.9.2.2

Here's the supposed error within the Mage.php file

/**
 * Varien Objects Cache
 *
 * @param string $key optional, if specified will load this key
 * @return Varien_Object_Cache
 */
public static function objects($key = null)
{
    if (!self::$_objects) {
        self::$_objects = new Varien_Object_Cache;  // Line 312
    }
    if (is_null($key)) {
        return self::$_objects;
    } else {
        return self::$_objects->load($key);
    }
}

Here's a link to a Pastebin which contains the full Mage.php file in question -> Pastebin - Mage.php

1

1 Answers

0
votes

The better and fastest way is to debug Varien_Autoload->autoload method yourself.

Do a litter modification on method autoload

public function autoload($class)
{
    if ($this->_collectClasses) {
        $this->_arrLoadedClasses[self::$_scope][] = $class;
    }
    if ($this->_isIncludePathDefined) {
        $classFile =  COMPILER_INCLUDE_PATH . DIRECTORY_SEPARATOR . $class;
    } else {
        $classFile = str_replace(' ', DIRECTORY_SEPARATOR, ucwords(str_replace('_', ' ', $class)));
    }
    $classFile.= '.php';
    // change start
    if($class == "Varien_Object_Cache") {
        echo $classFile; exit;
    }
    // change end
    //echo $classFile;die();
    return include $classFile;
}

After retrive 'classFile', check file exist or not.