37

I successfully installed the SUPEE-5994 patch :

[root@x]# sh PATCH_SUPEE-5994_EE_1.14.1.0_v1-2015-05-14-05-05-02.sh
Checking if patch can be applied/reverted successfully...
Patch was applied/reverted successfully.

But now, all my webpages are blank.

The httpd error log :

[error] [client x] PHP Fatal error: Class 'Mage_Install_Controller_Router_Install' not found in /var/www/x/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php on line 138

I've tried to :

  • Clear the /var/cache
  • Reset the chmod / chown
  • Restart the httpd service

But nothing seems to work.

Anyone have the same issue ?

EDIT: The Front.php file :

 Varien_Profiler::start('mage::app::init_front_controller::collect_routers');
    foreach ($routersInfo as $routerCode => $routerInfo) {
        if (isset($routerInfo['disabled']) && $routerInfo['disabled']) {
            continue;
        }
        if (isset($routerInfo['class'])) {
   // LINE 138 HERE
            $router = new $routerInfo['class'];
            if (isset($routerInfo['area'])) {
                $router->collectRoutes($routerInfo['area'], $routerCode);
            }
            $this->addRouter($routerCode, $router);
        }
    }
    Varien_Profiler::stop('mage::app::init_front_controller::collect_routers');

2 Answers 2

37

Have you switched off and cleared compilation?

via the console/ssh you can use

$ php -f shell/compiler.php -- disable

$ php -f shell/compiler.php -- clear

$ php -f shell/compiler.php -- compile

$ php -f shell/compiler.php -- enable

might need the fourth line...not sure.

It might be a problem with the line that comes before the code you showed

$routersInfo = Mage::app()->getStore()->getConfig(self::XML_STORE_ROUTERS_PATH);

Note: I had a similar problem where the admin was blank, however that turned out to be a file in a module that was overriding one of the core files - but this is not in your case. Just in case others look at this with that issue.

5
  • Wow, you're the guy ! Many thanks. Just edit the third line, it was php -f shell/compiler.php -- compile for me. It works !
    – kcdq
    Commented May 15, 2015 at 8:57
  • 1
    Cool. Had real trouble updating sites last week mate :) Glad to help Commented May 15, 2015 at 8:57
  • 1
    Updated good spot. Commented May 15, 2015 at 8:59
  • That's what upvotes are for, Jon Commented May 15, 2015 at 17:30
  • :) yer I know really, David. Just nice to see people getting out of a pickle. Commented May 18, 2015 at 8:31
15

If you've disabled the compiler and cleared the cache and you still run into the error

Class 'Mage_Install_Controller_Router_Install' not found

Check to see if the file app/code/core/Mage/Install/Controller/Router/Install.php exists.

When you ran the patch, the directory Router didn't exist in app/code/core/Mage/Install/Controller and so the Install.php file did not get created despite being told otherwise in the applied.patches.list file. This means you're missing a class and you get the message:

Fatal error: Class 'Mage_Install_Controller_Router_Install' not found

Excerpt from the applied.patches.list for the supposedly successful patch installation that fails to create the Install.php file:

patching file app/code/core/Mage/Install/Controller/Router/Install.php
patching file app/code/core/Mage/Install/etc/config.xml

The patch creates the following addition to the app/code/core/Mage/Install/etc/config.xml file which references the missing file:

 <default>
     <web>
         <routers>
             <install>
                 <area>frontend</area>
                 <class>Mage_Install_Controller_Router_Install</class>
             </install>
         </routers>
     </web>
 </default>
 <stores>
     <default>
         <web>
             <routers>
                 <install>
                     <area>frontend</area>
                     <class>Mage_Install_Controller_Router_Install</class>
                 </install>
             </routers>
         </web>
     </default>
 </stores>

Sample of what the missing file app/code/core/Mage/Install/Controller/Router/Install.php is supposed to contain.

<?php
/**
 * Magento Enterprise Edition
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Magento Enterprise Edition End User License Agreement
 * that is bundled with this package in the file LICENSE_EE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://www.magento.com/license/enterprise-edition
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to [email protected] so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade Magento to newer
 * versions in the future. If you wish to customize Magento for your
 * needs please refer to http://www.magento.com for more information.
 *
 * @category    Mage
 * @package     Mage_Install
 * @copyright Copyright (c) 2006-2014 X.commerce, Inc. (http://www.magento.com)
 * @license http://www.magento.com/license/enterprise-edition
 */

class Mage_Install_Controller_Router_Install extends Mage_Core_Controller_Varien_Router_Standard
{
    /**
     * Check if current controller instance is allowed in current router.
     * 
     * @param Mage_Core_Controller_Varien_Action $controllerInstance
     * @return boolean
     */
    protected function _validateControllerInstance($controllerInstance)
    {
        return $controllerInstance instanceof Mage_Install_Controller_Action;
    }
}
2
  • 1
    Good addition Fiasco Labs, I have heard people having this trouble. Commented May 18, 2015 at 10:32
  • 1
    Describes exactly what happened in our case and the above resolved the issue. Thanks
    – Flipmedia
    Commented May 18, 2015 at 12:22

Not the answer you're looking for? Browse other questions tagged or ask your own question.