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...')

  • 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 Jul 9 '15 at 16:45
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;
}
  • 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 Jul 9 '15 at 16:43
  • this error did not stop – emmanuel Jul 9 '15 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! – Luke Rodgers Jul 20 '15 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.

  • 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 Jul 12 '15 at 17:09
  • can u post complete error ? – rajatsaurastri Jul 12 '15 at 17:41
  • make sure you are checking both system.log and exception.log file – rajatsaurastri Jul 12 '15 at 17:42
  • aslo is Index controller of the cms module is overridden ? – rajatsaurastri Jul 12 '15 at 17:44
  • have you deleted 404 page ? – rajatsaurastri Jul 12 '15 at 17:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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