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);
}
  • It seems the error due to infinite looping. Please share your code for more help. – Gulshan Mar 11 '17 at 1:45
  • router.php code is updated. – Rizwan Khan Mar 14 '17 at 11:04
  • 1
    edit your question and add as new answer your solved one. – Teja Bhagavan Kollepara Mar 21 '17 at 13:06
  • @Rizwan Please post your updated code. – Kazim Noorani Mar 16 '18 at 6:36
2

I am Not Extending This Class in Controller After Extending

\Magento\Framework\App\Action\Action

And Impliments its execute() method it Works.

| improve this answer | |
  • 3
    explain your answer please i m not getting you – Waqar Ali Jul 24 '19 at 10:02

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.