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 install from our local dev stage to prod stage and one particular custom module throws a 404 error. Everything else works just fine on the prod server.

The entire install works perfectly (incl. this one custom module) on our local dev stage, which is a clone of the prod server (Nginx, PHP 5.6.30, MySQL).

We've cleared all caches, re-indexed all data and triple checked the code was pushed correctly to the prod stage.

So now we need to debug the routing of the prod stage Magento 1.9.x since the 404 error page does not contain any useful debugging information...

Any advice on how this can be done efficiently ?

Thank you !


please use Mage_Core_Controller_Varien_Router_Standard class, validateControllerClassName method to debug controller class name and controller file name. Hope it will help.

Update: For deeper understanding of magento routing please familiarize with this wonderful article from one of the best magento blogers exists - Alan Storm.

  • Hi Furman, thank you for your reply. Could you add a quick usage example to your post ?
    – pete19
    Jan 17 '18 at 6:29
  • 1
    @pete19 just var_dump() of $controllerFileName and $controllerClassName to see which class and Magento tries to find. See my updated answer. Jan 17 '18 at 7:20
  • 1
    thank you ! successfully debugged the routing issue using the _validateControllerClassName() function. turned out to be a file read error based on incorrect camelcase syntax. Prod server running CentOS did not like it, but local dev running Vagrant Ubuntu had no problem with it. Thanks again. Cannot upvote (due to my low rep), but THIS IS THE CORRECT SOLUTION !
    – pete19
    Jan 17 '18 at 14:47
  • @pete19 You can mark answer as correct without up voting. Jan 17 '18 at 14:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.