Skip to main content
Share Your Experience: Take the 2024 Developer Survey
19 votes

Magento 2 CE: Front controller reached 100 router match iterations Issue

You created an infinite loop: you request a URL starting with "test" your router sets module, controller and action to "moduletest", "test", and "test" you forward, using this request (the URL is ...
Fabian Schmengler's user avatar
16 votes
Accepted

Reserved keyword in controller action - Magento 2

There are some words that you cannot use for class names. Basically the reserved php words like new, public, static, ... To overcome this and still allow these words in the urls Magento adds the ...
Marius's user avatar
  • 198k
10 votes

Magento 2 CE: Front controller reached 100 router match iterations Issue

If your code is perfect and you still get an error, Then you have to check your sortOrder of router plugin class in di.xml. As magento official say : https://devdocs.magento.com/guides/v2.3/extension-...
Himanshu's user avatar
  • 1,761
9 votes
Accepted

Can multiple modules share a frontName in routes.xml?

I've honestly never tried, but best I can make out looking at examples from core, you should just need to add: <router id="admin"> <route id="company"> <module name="...
Peter O'Callaghan's user avatar
9 votes

Magento 2 CE: Front controller reached 100 router match iterations Issue

I know it's late to answer but it would be helpful for others. In magento 2.1.10, the standard router sortOrder has been changed to 30, making the custom router (which sortOrder is 22) forward ...
Tuan nguyen's user avatar
7 votes
Accepted

Using Reserved Words in Magento 2 URLs

I ended up adding a plugin for Magento\Framework\App\Router\ActionList <!-- File: app/code/Package/Namespace/etc/di.xml --> <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/...
Alana Storm's user avatar
  • 44.4k
7 votes
Accepted

Magento 2.3.5 Custom Module "Invalid security or form key. Please refresh the page"

In this case, I was accessing the wrong route, rather than /adminurl/vendor_module/store/ which caused the error message about an invalid key, I needed to go to /adminurl/vendor_module/store/index/. I ...
joeybab3's user avatar
  • 378
6 votes

Magento 2 admin - can no longer save configurable products after upgrade to 2.1

My host is Nexcess, this issue was resolved by them when I opened a ticket about the issue . They updated the apache mod_security that was apparently blocking the POST action to the URL. Problem ...
Michael A's user avatar
  • 181
6 votes

Magento EE 1.13 catalog routing

@benmarks answer is already good. But you will still have issues if your product URLs match your CMS page URLs. The URL rewrites from the table core_url_rewrite are checked before the routers are ...
Simon's user avatar
  • 5,736
5 votes
Accepted

Magento 1.9.x - Debug Routing

please use Mage_Core_Controller_Varien_Router_Standard class, validateControllerClassName method to debug controller class name and controller file name. Hope it will help. Update: For deeper ...
Stepan Furman's user avatar
5 votes
Accepted

Magento 2 can I have 2 front names for a module?

Define two routes in routes.xml <route frontName="name1" id="name1"> <module name="Vendor_Module"/> </route> <route frontName="name2" id="name2"> ...
Birjitsinh Zala's user avatar
5 votes
Accepted

Magento 2 : Front controller reached 100 router match iterations

I Was Facing same issue from last 4 Hours Then i got Solution This Might Occur Due to Many Different Reasons Incorrect Sort Order SortOrder of router in Vendor\Module\etc\frontend\di.xml ...
Waqar Ali's user avatar
  • 2,329
4 votes
Accepted

Overwriting controller vs overwriting action controller request

The second one has been introduced somewhere between Magento 1.4 and 1.5 and is since then the preferred way. It also has more flexibility, with this configuration any module can add itself as ...
Fabian Schmengler's user avatar
4 votes
Accepted

Magento 2 admin custom route results in 404 error

It was only a naming convention issue, I tried to rename my module Vmap_Import instead of VM_import and it worked. The lower/uppercase construction of the module's name was the only problem, and ...
Gael COAT's user avatar
  • 387
4 votes

Check action noRoute (404) on Every page using Observer not working Magento 2

I have added a custom no route handler using the following code <?xml version="0.1"?> <config> <type name="Magento\Framework\App\Router\NoRouteHandlerList"> <...
Magento2 Devloper's user avatar
4 votes

magento 2 api route with input parameter

After check the core modules, found that parameter node in webapi.xml is only used in Customer Module for self resource type. Below file is responsible for Convert parameter placeholder with value. ...
Pankaj Pareek's user avatar
4 votes
Accepted

Magento 2 Create Module with same frontName as other module?

Please follow below steps: Step-1: go to "app" from root directory of Magento 2 and create new directory code. Then create two more directories in app/code, Namespace and Module Name. The final ...
Nilesh Gosai's user avatar
  • 1,135
3 votes
Accepted

How does home page routing work

http://inchoo.net/magento-2/routing-in-magento-2/ on Magento 2 routing discusses the sequence of Routers: Base, CMS, UrlRewrite and finally Default Router. FrontController::dispatch loops through ...
gwideman's user avatar
  • 515
3 votes
Accepted

What is the purpose of Mage::getUrl?

Mage::getUrl provides one single point for generating urls. Magento uses everywhere absolute urls. This way you avoid issues when you have your app installed in a subfolder (and not only). Using ...
Marius's user avatar
  • 198k
3 votes
Accepted

Configuring custom admin routing

having some issues setting up admin routing. As per the Magento routing, The router is looking for /manufacturer/grid/Index not manufacturer/grid. This means admin Controller should be placed root\...
Krishna ijjada's user avatar
3 votes

Custom Module Controller not working

try using a lower case c on Controllers so it becomes controllers
Raj's user avatar
  • 532
3 votes

Front controller reached 100 router match iterations

This issue come because Mach condition check infinite the solution is public function match(\Magento\Framework\App\RequestInterface $request) { if($request->getModuleName() == 'search'){ ...
Birjitsinh Zala's user avatar
3 votes

Magento 2 Create Module with same frontName as other module?

I think Nilesh Gosai answer is over engineering in this case. You can easily create file: {VendorName}/{ModuleName}/etc/frontend/routes.xml <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-...
bakalov's user avatar
  • 188
3 votes

How to create AJAX action for POST requests in Magento 2.3?

For future reference, I was only able to make my request work by doing the following steps in Magento 2.3.1 otherwise I was getting a 404. I checked class vendor/magento/module-authorizenet/...
gabtzi's user avatar
  • 666
3 votes
Accepted

Magento 2 frontend route only allow POST method

Magento request object has a function $this->getRequest()->getMethod() which provide the request method name on request object. So using this getMethod(),you can prevent your route from all ...
Amit Bera's user avatar
  • 77.6k
3 votes
Accepted

Magento 2 custom route 404 without index.php

You have to Rename your frontname because when you access vendor/index/index first it will goto the vendor folder not in your controller so in Vendor there is no any file for index that's why you are ...
Rakesh Varma's user avatar
  • 2,226
2 votes

Magento 2: How to Set controller, module, action name?

I just done with this $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); //get request object $requestOb = $objectManager->get('Magento\Framework\App\Request\Http'); $...
Hoang Huynh Nhat's user avatar
2 votes

Magento 2: How to Set controller, module, action name?

try from controller $request = $this->getRequest(); $request->getModuleName('catalogsearch'); $request->setControllerName('advanced'); $request->setActionName('index');
Sohel Rana's user avatar
  • 35.9k
2 votes

How to create a custom Adminhtml controller

It took me ages to figure out that <args> <modules> <myrandomtag before="Mage_Adminhtml"> My_Module_Adminhtml </myrandomtag> </modules&...
Tofeeq's user avatar
  • 161
2 votes
Accepted

Custom router is not working in Router.php Magento 2 [SOLVED]

Finally, I have SOLVED the issue. No changes in di.xml. Below are the changes I have made: app\code\Custom\Module\Controller\Router.php removed check condition. namespace Custom\Module\Controller; ...
Jackson's user avatar
  • 9,939

Only top scored, non community-wiki answers of a minimum length are eligible