运行此www.baseurl.com/home/feed网址时,前端控制器达到了100次路由器匹配迭代

时间:2014-08-27 09:45:17

标签: magento

运行此www.baseurl.com/home/feed url时,我正面临magento url错误前端控制器达到100次路由器匹配迭代。请帮我解决这个问题。

1 个答案:

答案 0 :(得分:0)

Here是一种找出确切问题的方法 打开文件

app/code/core/Mage/Core/Controller/Varien/Front.php 

找到代码段

while (!$request->isDispatched() && $i++<100) {
    foreach ($this->_routers as $router) {
        if ($router->match($this->getRequest())) {
            break;
        }
    }
}

替换为

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;
        }
    }
}

再次重新加载您的网站,您可以在var/log/system.log

查看详细的错误日志