n98-magerun icon indicating copy to clipboard operation
n98-magerun copied to clipboard

Feature Request: show existing routes

Open Flyingmana opened this issue 11 years ago • 4 comments

In Symfony its possible to list all existing routes.

As magento works a bit different, I would suggest to only list module routes from config.xml

Flyingmana avatar Nov 17 '13 13:11 Flyingmana

@Flyingmana It's currently possible to list all defined routes with config:dump command.

n98-magerun.phar config:dump frontend/routers

Can you explain what the command should further do?

cmuench avatar Nov 21 '13 15:11 cmuench

I'd like to see a command which lists the partial URL and the controller that would be used. For example:

Route Name Controller Name URL Controller
catalog category /catalog/category/ Mage_Catalog_CategoryController
catalog product /catalog/product/ Mage_Catalog_ProductController
adminhtml dashboard /admin/dashboard/ Mage_Adminhtml_DashboardController
adminhtml sales_order /admin/sales_order/ Enterprise_SalesArchive_Adminhtml_Sales_OrderController

Somewhat mirroring what the Magneto_Debug toolbar shows in its Controller tab:

2015-11-04_15-40-27

But for all possible routes.

The config:dump lists the configuration but not how those routes are interpreted and used by the router. Being able to list the actual base URLs and corresponding class would be a huge help when debugging routing issues.

Other possible features:

  • Ability to dump frontend and adminhtml (or possibly both)
  • Ability to list all actions too (though this would make the list quite long)
  • Ability to see whether admin routes were configured the "old way" (which SUPEE-6788 no longer supports)

colinodell avatar Nov 04 '15 20:11 colinodell

@colinodell for your last bullet-point, please see this existing magerun extension: MageRun Addons by peterjaap, it has the command you're looking for: https://github.com/peterjaap/magerun-addons#find-extensions-that-use-old-style-admin-routing-which-is-not-compatible-with-supee-6788-and-magento-1922

ktomk avatar Nov 04 '15 21:11 ktomk

can we have same option in magento 2 ? thanks

taoufiqaitali avatar Mar 08 '19 15:03 taoufiqaitali