1

I m using magento 2.1.3. Looking Specific Solution for "Front controller reached 100 router match iterations" Error...? I checked some answers on stackexchange but not working for magento 2.1.3.

public function match(\Magento\Framework\App\RequestInterface $request) {

    $identifier = trim($request->getPathInfo(), '/');

    /** @var \Magento\Cms\Model\Page $page */
    $page = $this->_pageFactory->create();
    if (strpos($identifier, 'xyz.html') !== false) {
        $request->setModuleName('My_Module')->setControllerName('mymodule')->setActionName('index');
    }
    if (strpos($identifier, 'pqr.html') !== false) {
        $request->setModuleName('My_Module')->setControllerName('mymodule')->setActionName('testing');
    }
    $request->setAlias(\Magento\Framework\Url::REWRITE_REQUEST_PATH_ALIAS, $identifier);
}
4
  • It seems the error due to infinite looping. Please share your code for more help.
    – Gulshan
    Mar 11, 2017 at 1:45
  • router.php code is updated. Mar 14, 2017 at 11:04
  • 1
    edit your question and add as new answer your solved one. Mar 21, 2017 at 13:06
  • @Rizwan Please post your updated code. Mar 16, 2018 at 6:36

1 Answer 1

2

I am Not Extending This Class in Controller After Extending

\Magento\Framework\App\Action\Action

And Impliments its execute() method it Works.

1
  • 3
    explain your answer please i m not getting you
    – Waqar Ali
    Jul 24, 2019 at 10:02

Your Answer

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

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