Skip to content

Route listing command/debugger #5899

Closed
Closed
@nickmarx12345678

Description

@nickmarx12345678

I've encountered repeated difficulty creating and debugging new routes on custom modules, especially as a newcomer to Magento and Magento 2, where documentation is very limited.

One example of problems faced was deciphering the url matching scheme, especially for adminhtml routes, because of the number of problems thats can cause a redirect to the homepage with no logging or feedback to revise from.

It would save significant amounts of time for new developers if you were to include sort of route listing command with the standard codebase. This might include:

A mapping of urls to what Magento thinks is their action controller (similar to Ruby on Rails rake routes command). I made the quickest progress when I finally went into the Base router and started printing $this->actions during the request flow and dieing.

adminhtml/somecontroller/someaction => \Company\Module\Controllers\Adminhtml\Somecontroller\Someaction

Further, I would highly suggest not swallowing, but logging errors that cause a route to redirect to */*. I've run into several issues when setting up pages that would've been quickly solved by logging the issue, but instead were hidden and found via process of elimination

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions