2

my site keep giving me same report as paste below, please how do solved this issue?

a:5:{i:0;s:52:"Front controller reached 100 router match iterations";i:1;s:409:"#0 /home/thewa2m2/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(179): Mage::throwException('Front controlle...')

1
  • the error still continue pls how resolve it a:5:{i:0;s:52:"Front controller reached 100 router match iterations";i:1;s:409:"#0 /home/thewa2m2/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(179): Mage::throwException('Front controlle...')
    – emmanuel
    Commented Jul 9, 2015 at 16:45

2 Answers 2

1

This often happens for two reasons,

  1. You removed/added/changed a module without disabling the configuration cache first
  2. Configuration cache corruption

To solve 1.

Clear your configuration cache and if the issue is resolved, nothing further is required.


To Solve 2.

This is a core-code bug in some versions of Magento. You can test if it is caused by this bug by editing Mage_Core_Model_Config to reflect the following.

public function init($options=array())
{
    $this->setCacheChecksum(null);
    $this->_cacheLoadedSections = array();
    $this->setOptions($options);
    $this->loadBase();

    $cacheLoad = $this->loadModulesCache();
    if ($cacheLoad) {
        return $this;
    }
+   $this->_useCache = false;

    $this->loadModules();
    $this->loadDb();
    $this->saveCache();
    return $this;
}
3
  • this error did not stop a:5:{i:0;s:52:"Front controller reached 100 router match iterations";i:1;s:409:"#0 /home/thewa2m2/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(179): Mage::throwException('Front controlle...')
    – emmanuel
    Commented Jul 9, 2015 at 16:43
  • this error did not stop
    – emmanuel
    Commented Jul 9, 2015 at 16:44
  • github.com/convenient/magento-ce-ee-config-corruption-bug/… @emmanuel Have a look there, it was how I initially debugged the _useCache = false solution. It could help suppress the issue and gather more useful debug data! Commented Jul 20, 2015 at 11:22
0

As seen from the message, the problem occurs because your routers are making circular references for dispatching requests. One of them matches request, but doesn't dispatch and pushes it to redispatch again. Or no router matches request at all. I cant directly tell the cause of this error, but can work with you to get the cause of it. In order to debug it first open app/code/core/Mage/Core/Controller/Varien/Front.php and find these lines or somewhat similar

    while (!$request->isDispatched() && $i++<100) { 
      foreach ($this->_routers as $router) { 

      }
    }

and replace it with (take the backup of the file)

Mage::log('----Matching routers------------------------------');
Mage::log('Total ' . count($this->_routers) . ': ' . implode(', ', array_keys($this->_routers)));
while (!$request->isDispatched() && $i++<100) {
    Mage::log('- Iteration ' . $i);
    $requestData = array(
        'path_info' => $request->getPathInfo(),
        'module' => $request->getModuleName(),
        'action' => $request->getActionName(),
        'controller' => $request->getControllerName(),
        'controller_module' => $request->getControllerModule(),
        'route' => $request->getRouteName()
    );

    $st = '';
    foreach ($requestData as $key => $val) {
        $st .= "[{$key}={$val}]";
    }
    Mage::log('Request: ' . $st);
    foreach ($this->_routers as $name => $router) {
        if ($router->match($this->getRequest())) {
            Mage::log('Matched by "' . $name . '" router, class ' . get_class($router));
            break;
        }
    }
}

after that wait for the site to produce the error. then open your system.log file and see whats going wrong ? what router break ?

Ideally this issue arises once magento is not able to load a core module.

If you have trouble to find out the solution. Let me know I will try to help you.

9
  • hi, thanks for helping me on this issue but after adding the code you displace above the situation still continue but this time is different error report... pls view below and tell me what to do.. a:5:{i:0;s:52:"Front controller reached 100 router match iterations";i:1;s:409:"#0 public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(196): Mage::throwException('Front controlle...')
    – emmanuel
    Commented Jul 12, 2015 at 17:09
  • can u post complete error ? Commented Jul 12, 2015 at 17:41
  • make sure you are checking both system.log and exception.log file Commented Jul 12, 2015 at 17:42
  • aslo is Index controller of the cms module is overridden ? Commented Jul 12, 2015 at 17:44
  • have you deleted 404 page ? Commented Jul 12, 2015 at 17:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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