Questions tagged [routing]
Denotes questions related to the routing mechanism of Magento
130
questions
4
votes
1
answer
64
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
1
answer
23
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
1
answer
942
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 /...
1
vote
1
answer
422
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 ...
1
vote
1
answer
1k
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
2
answers
34
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
1
answer
378
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
1
answer
10k
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
1
answer
673
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 ...
0
votes
1
answer
341
views
How to change magento home page with non cms page?
I have one page www.abstract.id/landingpage and I wanna make it as my home page, and the url changed to www.abstract.id
I have a block, controller, etc, helper and the frontend xml & page.phtml
3
votes
3
answers
4k
views
Check action noRoute (404) on Every page using Observer not working Magento 2
How to check action noRoute (404) on every page using Observer?
etc/events.xml
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:...
2
votes
1
answer
166
views
Custom controller reuses Magento front name
I've added custom controller under magento frontName and it works.
My routes.xml:
...
<router id="standard">
<route id="customer" frontName="customer">
...
5
votes
2
answers
4k
views
How does home page routing work
A module usually contains a routes.xml file which, as I understand it, specifies the routes which the module handles.
I would like to know how routing is handled for the home page, for example for ...
0
votes
1
answer
70
views
Set module frontname programatically
In my magento admin area, admin can set a name to be displayed on the contact us page. For example, admin can set "contact-us" as the url-alias and I want to set that as the frontname of my contacts ...
2
votes
0
answers
164
views
How does "front name" of a module affect its routing?
This is a question that comes to me as i faced below situation:
I had an extension with front-name: "csmymodule". I changed its front-name with: "mymodule".
But I notice that both these urls work:
...
5
votes
5
answers
9k
views
Custom router is not working in Router.php Magento 2 [SOLVED]
I am trying to redirect the page/action by using a custom router as Router.php, but I am getting 100 router match iterations exception.
app\code\Custom\Module\etc\frontend\di.xml
<?xml version="1....
2
votes
1
answer
2k
views
Magento 2: How to define scope in di.xml & Router.php
I'm using Magento 2 CE Version 2.1.0.
app\code\Custom\Module\etc\frontend\di.xml
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
0
votes
1
answer
2k
views
Magento 2: How to use redirect in Router.php file [SOLVED]
As following Magento 2: How to define Scope For Router.php we already have
if ($condition->getRedirectUrl()) {
$this->response->setRedirect($condition->getRedirectUrl());
$...
1
vote
1
answer
886
views
Magento 2: How to define Scope For Router.php
I have created Custom Module. As it requires some front-end routing, have to create Router.php
Whenever I'm accessing Magento eCommece Frontend other pages, say Category/Product Page. It will call my ...
8
votes
3
answers
11k
views
Magento 2 CE: Front controller reached 100 router match iterations Issue
I'm using Magento 2 CE Version 2.1.0
Taking reference of http://inchoo.net/magento-2/routing-in-magento-2/ for Routing.
My Router.php Controller Code
public function match(\Magento\Framework\App\...
0
votes
1
answer
39
views
can i add more than 1 pages in a module in magento?
I already have a module and i want to create new page which redirected from 1st of my module.
I want to know how to create more than 1 page in a module and also how to link pages.
5
votes
1
answer
3k
views
Magento 2 admin custom route results in 404 error
I'm beginning with Magento CE 2.1 and I'm stuck with an admin custom route issue that results in a 404 error.
I created a module named 'VM_import' and get it registered (checked).
Now i try to ...
1
vote
1
answer
51
views
Define custom homepage
We have a Dashboard package which can be accessed as follows: www.shop.be/dashboard. How can we make sure that this always is the homepage? So, www.shop.be will always show the dashboard instead of ...
2
votes
1
answer
1k
views
What is the purpose of Mage::getUrl?
How is the Mage::getUrl() method useful? Why can't I just use a normal relative link?
0
votes
0
answers
20
views
Give the option in admin to change custom module route on frontend [duplicate]
Say on frontend your main module page is www.website/test/
etc/frontend/routes.xml:
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:...
2
votes
3
answers
3k
views
Magento 2 admin - can no longer save configurable products after upgrade to 2.1
After upgrading from 2.0.7 to 2.1, none of my configurable products will save on edit. In the browser console I can see there is an ajax call to the Product/Validate controller that returns a 404 ...
0
votes
1
answer
628
views
magento routing not works when i enabled 'Add Store Code to Urls' in admin
when i change Add Store Code to Urls to yes at
system > web > url options in admin panel,
all the routing to my controller is not works. returns 404 error page. how to resolve this?
9
votes
1
answer
1k
views
Reserved keyword in controller action - Magento 2
I am working on an admin grid concept. I found one github source code and analyzed that one.
While I found the URL is different from the declaration in the UI component layout.
<item name="url" ...
6
votes
1
answer
2k
views
Can multiple modules share a frontName in routes.xml?
In my current project I have developed several modules to add different pieces of functionality. I'd like the admin of each module to be managed from a shared frontName, for example:
...
1
vote
1
answer
2k
views
Configuring custom admin routing
I'm having some issues setting up admin routing.
My menu.xml file is as follows, note the custom route /manufacturer/grid.
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
1
vote
2
answers
262
views
Custom Module Controller not working
I have built a custom Module for my client's site where I have been putting my overrides and observers, built a helper class, etc. It has been working fine to now.
I am trying to add a Controller, ...
7
votes
1
answer
346
views
Using the secret admin frontname in a new adminhtml router
I have a module that uses an abnormal naming convention. Instead of NAMESPACE_MODULE it uses NAMESPACE_MODULE_SUBMODULE:
$ find app/code/community -type f
app/code/community/Acme/ModuleName/Bar/etc/...
0
votes
1
answer
194
views
Serving a different product page for certain products with router
I've developed a module that sends some product pages to a product customization wizard. I've used getProductUrl() to change the links to point to the customization URL.
http://mywebsite.com/designer/...
3
votes
1
answer
363
views
Overwriting controller vs overwriting action controller request
I'm busy working though Grokking Magento by Vinai Kopp, and reached a part where he explains where he explains how to rewrite requests to (eg) the checkout/cart controller, and he gives an example of ...
1
vote
0
answers
916
views
Magento 2:ERROR: Front controller reached 100 router match iterations
I got error when trying to do like this extention
http://inchoo.net/magento-2/routing-in-magento-2/
it work ok but when I add a foreach to check the url, I got error
Front controller reached 100 ...
0
votes
3
answers
1k
views
Magento 2: How to route the page to catalogsearch/advanced/result/ page with abc/xyz.html Url
I created an observer to catch the event when a new url is requested with
<event name="controller_front_send_response_before">
<observer name="brands_index_events_observer" instance="...
2
votes
2
answers
1k
views
Magento 2: How to Set controller, module, action name? [duplicate]
I want to do these codes like in magento 1
$request->setModuleName('catalogsearch')
->setControllerName('advanced')
->setActionName('result');
and then the page load content ...
2
votes
2
answers
4k
views
Admin router redirects to dashboard
I am trying to create a custom controller in admin side.
My config file as below:
<admin>
<routers>
<salesref>
<use>admin</use>
...
2
votes
1
answer
2k
views
Magento2: check if url is an admin url
I've 2 websites UK (default) and IN . I'm using PHP geo-location library to re-direct customers to Indian website based on their IP which is working fine on frontend.
$geoipPath = 'lib/geoip/geoip....
0
votes
1
answer
353
views
Admin routing compatibility mode for extensions
If I enable Admin routing compatibility mode for extensions Magento states that security of the admin would be weaken.
http://prntscr.com/8z9rqx
Please could someone explain exactly how it would be ...
9
votes
3
answers
999
views
Why Does Magento 2 Force URLs to be 3+ Characters
If you attempt to create a module with a front name like hello-world in Magento 2, you'll get an error that looks like this.
Invalid XML in file /Users/alanstorm/Sites/magento-2-with-keys/magento2/...
1
vote
1
answer
153
views
Admin routing compatibility mode for extensions in not available in Magento 1.9.2.2
I have upgraded magento to 1.9.2.2, i wanted to confirm will it also install all patches including SUPEE-6788 by default..?
or we have to install SUPEE-6788 seperately in magento 1.9.2.2 ?
1
vote
1
answer
389
views
Extension Admin page "404 not found"
Installed update for an extension (EmailDirect, after running patch 6788) successfully on local environment, but when uploaded to testing server it throws a "404 page not found".
I even reinstalled a ...
2
votes
2
answers
543
views
Using __call in a controller
Is there any examples of using __call in a controller to replace a specific action method.
I have a situation where I need to provide different endpoints to the same controller. A reference to each ...
34
votes
3
answers
23k
views
How to update admin routers of custom module for patch SUPEE-6788
I'm not sure how to update custom modules to work with the SUPEE-6788 patch, the instructions are not very clear.
Based on Alan Storm's tutorial, I created a simple module in the generator www....
0
votes
2
answers
476
views
Magento Admin Controller Issue
On October 22, 2015, Magento will release security patch SUPEE-6788. According to the technical details, 4 APPSEC's that have been fixed require some rework in local and community modules. I'm trying ...
71
votes
5
answers
18k
views
How to check which modules are affected by security patch SUPEE-6788
On October 27, 2015, Magento has released security patch SUPEE-6788. According to the technical details, 4 APPSEC's that have been fixed require some rework in local and community modules:
APPSEC-...
2
votes
1
answer
1k
views
How is Magento 2 RouterList Populated?
How does Magento2 populate its $routerList in :
public function dispatch(RequestInterface $request)
{
\Magento\Framework\Profiler::start('routers_match');
$routingCycleCounter = 0;
$...
4
votes
1
answer
2k
views
How Magento 2 Routing Works
I need to know how magento 2 Routing Works...
I want to know that when we request for any task in magento 2 then how its process to controller...
Like I used command line console...'
Then how my ...
7
votes
1
answer
1k
views
Magento 2: Why Does My Custom Controller Generate an Interceptor?
I recently created a basic routing configuration for a test module
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/...