Questions tagged [routing]
Denotes questions related to the routing mechanism of Magento
121
questions
0
votes
0answers
23 views
Controller Issue (Magento 2)
Controller is not executing Magento\Newsletter\Controller\Subscriber\NewAction.php
Below is the ajax request to call the execute method for Magento\Newsletter\Controller\Subscriber\NewAction.php but ...
0
votes
1answer
37 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
1answer
28 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
1answer
28 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 ...
2
votes
1answer
617 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
1answer
63 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 ...
0
votes
1answer
25 views
Custom Router not working with IndexController in the same module
I have a module with a custom router.
Here's the code:
di.xml
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:...
1
vote
1answer
121 views
How to get magento 2 default route name list ? (Without third party route)
I am creating custom module which redirect to login if third party module route id find.(frontend)
but i have issue how to identify the current route is default or third party route ?
how to check ...
1
vote
0answers
374 views
How do I add an id/parameter to a frontend route?
I want to add an "id"/"parameter" to a front-end route in the following way:
store.example.com/blogpost/view/**213**
where 213 is the parameter I want to pass.
I have been looking at the Magento 2 ...
0
votes
1answer
38 views
Magento Admin URL returns 404, after changing <use> xml parameter
I've installed a module which didn't work as expected.
As a fix I tried changing the admin use parameter in the config.xml as i noticed it was the old router coding style.
After changing <use>...
1
vote
3answers
205 views
Get a route frontname by route id
I'm currently working with URL rewrites and I'm looking for a way to get the front name of a route from a module.
<router id="standard">
<route id="support" frontName="faq">
&...
0
votes
1answer
132 views
Magento 2 custom route 404 without index.php
I have created a new module with my custom route. The frontname for my module is vendor and the id is vendor
I have created a page with route vendor/index/index, created a controller and block for my ...
1
vote
1answer
59 views
How do I find out where a specific route goes?
In once place, I have a /Vendor/Module/etc/routes.xml, showing:
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes....
0
votes
2answers
110 views
Custom controller action to specific path in magento 1.9
how to redirect the custom controller path to specific store name
http://testurl.com/testmodule/index/testview/id/123/
to
http://testurl.com/testname
thanks
0
votes
2answers
148 views
Magento 2: Use a custom controller as website root?
I'm building a little module on magento2 and I can currently access it at mysite.com/test/mymodule. I want to be able to access it at mysite.com.
How can I do that?
I've tried doing a URL rewrite ...
0
votes
1answer
233 views
Magento 2.X: Module URL rewrite
Magento ver. 2.3.2
I am writing a Magento 2 module. I'm trying to re-write a CMS page URL:
https://www.test.com/url-test/cat1/cat2/cat3/
https://www.test.com/url-test?path=/cat1/cat2/cat3/
I have ...
4
votes
4answers
888 views
Magento 2 frontend route only allow POST method
I'm using magento 2.2.5 and created a frontend route like this:
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:...
0
votes
0answers
11 views
Where is the code that assigns the browser's URL when clicking a button?
When I click a button that sends me to a controller action in Magento, where is the code that directs the browser to a new URL? I've been trying to trace the code with the debugger, but I can't find ...
1
vote
0answers
40 views
Where is this text coming from at the end of my checkout URL?
I'm adding a "buy now" button to my site. I'm using the code from here.
When I click the button, my site tries to go to example.com/checkout/#93=4, which then results in it going to example.com/...
0
votes
1answer
33 views
How does routing work for product pages?
The Magento documentation says Magento URLs are built like <store-url>/<store-code>/<front-name>/<controller-name>/<action-name>, but I can't find anything about how ...
2
votes
1answer
35 views
Changing config/connection type for consumers
I would like to set this consumers: 'async.operations.all' connection type from rabbitmq (amqp) to crontab+sql (message queue & mysqlmq)as default so my setup of external crontab can execute .
...
0
votes
1answer
85 views
New route not working (2.2)
I am frustrated. I'm unable to add an ajax route in Magento 2.2 no matter what I try, I get a 404.
routes.xml:
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-...
3
votes
1answer
1k views
Magento 2 : Front controller reached 100 router match iterations
I created custom router. But, when I run it display error.
Front controller reached 100 router match iterations
di.xml :
<type name="Magento\Framework\App\RouterList">
<arguments>
...
5
votes
0answers
195 views
Magento 2 PWA Venia - how to set 404 page
I'm using Venia from PWA Studio and I want to create redirect to my 404 page when someone use wrong link for example "http://venia.loc/wrong-route".
Page on dev environment when running "watch:venia"
...
2
votes
0answers
137 views
Newsletter subscriber custom EDIT route Magento 2.3
I am having custom edit route for core module Magento_Newsletter Subscriber.
When I access Edit route loader keeps spinning and doesn't stop.
In nginx log I got: 2019/02/11 14:55:33 [error] 15820#...
0
votes
3answers
1k views
How to create AJAX action for POST requests in Magento 2.3?
How to create a controller action that can be requested by POST properly in own custom payment module in Magento 2.3? How to create a parent class that will be extended by classes corresponding to ...
1
vote
1answer
233 views
route shows user login page title
In one Magento 2.2.6 instance something very odd occurs: the meta page title shows
<title>Customer Login</title>
and the page title in the content also shows Customer Login - even though ...
0
votes
1answer
283 views
Magento2 admin form routing issue
I'm trying to create a Magento extension but I'm getting an issue when accessing a custom form for submitting a new entry. The grid for showing results works fine but clicking the add new button from ...
1
vote
1answer
1k views
Magento 2 Front controller reached 100 router match iterations issue
I am not able to access back-end and front end working fine. I have disabled and removed custom modules, but still it's persist. Help me!
My magento version 2.1.6
When I print anything inside the ...
0
votes
1answer
370 views
CMS page not found
I have a strange error.
I created a new CMS page with url mtclp/20 and got an error page 404.
If I change url on just lps, it works. If I try with, for example, test/30, It also works. Other pages ...
0
votes
1answer
366 views
Magento 2 | Route has layout
I created a custom route which is working fine.
However it is just a blank page.
How can I add the header and the footer?
Thanks!
0
votes
2answers
30 views
Form submission
i'm new to magento. I trying to make a form to add some user to my database (not with form from magento, i need to check if the user exists in my xml file...).
When I submit my form, I need to check ...
1
vote
2answers
383 views
Routing : how to specify a controller and a method for a specific URL?
How could I give the controller's name (class name) and its method in routes.xml from a plugin ?
for insance, I have two front routes, and I would like them to point to :
in the file MyCompany/...
0
votes
1answer
51 views
Why magento 2 has controller file for each action?
Magento 2 controller file created for each action like add,edit, delete, update, get.
I want to know about the advantage of creation controllers for each action.
2
votes
0answers
133 views
M2 - one frontend for one store in routes.xml
How can I have multiple route available for one module but different store ? I have one module that is going to be used for several stores (us / de / fr etc..)
I would like to have something like :
...
0
votes
2answers
661 views
change default homepage in magento2 url only for mobile theme
I have a module with 2 themes for mobile and desktop.
In the mobile theme I want to change the default homepage to another url.
So when the mobile detection it is activated instead to go to the ...
2
votes
1answer
570 views
Magento 2 can I have 2 front names for a module?
I want to create a module for which I would like 2 frontName is it possible. if yes how can I do it ?
Example
1. example.com/a/index/test
2. example.com/b/index/test
both pointing to app/code/...
0
votes
1answer
804 views
Magento 2 Create Module with same frontName as other module?
I have to extend functionality of Magento_Customer module and new some more controller under customer/account like customer/account/mobileVerification so my question is, Is okay to have the same ...
1
vote
1answer
1k views
Magento 1.9.x - Debug Routing
I'm looking for advice on best practices on how to debug the routing of Magento 1.9.x efficiently.
We're running into a strange issue here where we push a Mage 1.9.3.6 install from our local dev ...
5
votes
1answer
505 views
Front controller reached 100 router match iterations
I am trying to rewrite url in routes.php with magento 2.2.2 version. url key is dynamically set from configuration.
got this error :: Front controller reached 100 router match iterations
$urlKey = ...
1
vote
0answers
104 views
Magento 2 custom routing error. stuck in loop?
I'm having some trouble with Router.php.
I'm guessing it's the line(s) where I check the URL and return false?
Exception #0 (LogicException): Front controller reached 100 router
match iterations
...
4
votes
1answer
57 views
Page not found while trying access controller with parameter in url
i created a simple controller like this:
namespace Namespace\Module\Controller\Confirm;
class Index extends \Magento\Framework\App\Action\Action
{
protected $resultPageFactory;
public ...
0
votes
1answer
20 views
How to append module url to an area?
So I have a module (Menu) that I built following a tutorial and I want to treat it as an area. I then want to build other modules (I have Magento's Hello World module currently integrated for testing) ...
1
vote
1answer
530 views
Disable all customer related routes
I'm building a Magento 2.2 store and would like to remove all customer pages like login, account, register, etc.
I noticed that I can remove all customer routes (customer/ * / *) when I remove the /...
0
votes
1answer
325 views
Getting all Magento 1.9 controller urls
I've inherited a large magento application with a huge number of extensions, and have been tasked with finding all accessible urls which match certain criteria (meaning I must look manually).
I'm ...
0
votes
1answer
723 views
Magento doesn't support camelCase in URL/route?
If you are declaring your router in etc/adminhtml/routes.xml with similar way
<?xml version="1.0" encoding="UTF-8"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:...
0
votes
2answers
26 views
Magento 2 : How to Copy whole admin panel in custom route
I want to create the whole admin panel in my custom route, like
here is the default method is 192.168.1.57/magento/admin to
192.168.1.57/magento/demoroute with all the functionalities of admin.
1
vote
1answer
231 views
Magento2 - is it possible to specify multiple urls in api?
I would like to know is it possible to (call) specify multiple URLs in a single route webapi.xml ?
Ex:-
<?xml version="1.0"?>
<routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-...
8
votes
1answer
7k views
magento 2 api route with input parameter
I'm trying to create an api route with input parameters but I'm not getting the expected result.
Here is my webapi.xml:
<?xml version="1.0"?>
<routes xmlns:xsi="http://www.w3.org/2001/...
11
votes
1answer
532 views
Using Reserved Words in Magento 2 URLs
Is it possible to create a module in Magento 2, using standard routing, that responds to a URL in the form of
http://magento.example.com/namespace_module/return/index
That is -- a URL where the ...