Questions tagged [routing]
Denotes questions related to the routing mechanism of Magento
130 questions
1 vote
1 answer
143 views
Route to Existing Layout
I am working on a custom page module and want to make a custom route however I would like to use the catalog_category_view.xml layout, instead of the [module_name]_index_index.xml needed for my route ...
2 votes
1 answer
238 views
Front controller reached 100 router match iterations and routing issue
Every day we get 100 if not 1000's of main.CRITICAL: Front controller reached 100 router match iterations error in our log. var/report is full of logs. Yesterday we had 280 logs in /report. in var/...
0 votes
4 answers
691 views
Why is my post controller returning a 404?
I've created and enabled a module at app/code/Post/Test: app/code/Post/Test/registration.php: <?php \Magento\Framework\Component\ComponentRegistrar::register( \Magento\Framework\Component\...
0 votes
1 answer
678 views
Magento 2: Controller Invalid return type for Account Controller
Just wrote the following controller: namespace MySite\MyCustomModule\Controller\Dashboard; use Magento\Customer\Controller\AccountInterface; use Magento\Framework\App\Action\HttpGetActionInterface as ...
0 votes
1 answer
366 views
Homepage routing problem with $this->pathConfig->getDefaultPath()
I'm currently running a Multistore Magento 2 site, I have 4 websites configured, 2 of which have multiple URL's to access the site. As a case example I have: domain-a.com www.domain-a.com domain-a.co....
0 votes
1 answer
698 views
How can I get the url of my new module?
This is a simple Hello World in a Block, I would like how can I get the URL of this, to check the website this HelloWorld. I don't know to check my exercises, because I don't know how to get the URL ...
0 votes
1 answer
2k views
Magento 2: How to use redirect in Router.php
I am trying to redirect a cms page to a custom controller. in router.php I can check the current URL, If the current URL is as an example if it matches /test-url i want to do a redirect to /test-url-...
0 votes
1 answer
290 views
Magento 2 CMS Page URL redirect 2.3.5
I want to redirect a custom URL and change the URL path ONLY. If my URL is www.domain.com/about-company or www.domain.com/product-a-faq I want these to be shown in different URL examples -> www....
1 vote
0 answers
224 views
Magento 2 custom routing frontend not working (100 router match iterations)
I have used this url to change it but i am keeping getting the same erros https://magento.stackexchange.com/a/209478/96152 i have a custom routes.xml <?xml version="1.0"?> <config ...
0 votes
1 answer
1k views
How to create a custom router with url key
I'm looking to create a custom router so that if I go to www.mysite.com/promotions/cruise-trip it would route to www.mysite/offers/promotions/index/id/5 for example. I'm not really sure how to do this ...
0 votes
1 answer
226 views
Magento 2 - all custom routing suddenly broken
I have a local Magento 2 site, not much changed recently. But all of a sudden, all custom routing, no matter what module it is from, is broken. In admin and frontend, I get 404s (from Magento, not a ...
0 votes
1 answer
198 views
Error 404 : The requested page do not exist
My target URL is: http://mylocalhost/devis/customer/printPdf But it triggers a 404 and I can't find why I have my frontend router app/code/FT/Devis/etc/frontend/routex.xml <?xml version="1.0&...
0 votes
1 answer
698 views
Custom Controller goes to 404 in Magento 2?
I have created a custom controller and die on controller execute page but it goes to 404 ? COntroller file ( path : app/code/Mageplaza/HelloWorld/Controller/Index/helloworld.php ) <?php namespace ...
3 votes
1 answer
2k views
Magento 2.3.5 Custom Module "Invalid security or form key. Please refresh the page"
I have created a custom module that for the most part works great, it's frontend routes work flawlessly and it hasn't had issues. Recently I attempted to create a custom admin grid by following https:/...
2 votes
1 answer
548 views
Can you redirect CMS page to custom frontend route magento 2.3.5
I am trying to redirect a cms page to a new route which I have created for frontend. I am not sure if we can redirect to the new custom module route frontend with a config in admin area. My aim is I ...