Here is my module's config.xml:

<?xml version="1.0"?>






                <mycompany_teachers_review_after_save module="mycompany_teachers">
                    <label>Video Comment: Email Teachers</label>



I've tried all of the following to get the controller URL:


All come back empty. I've tried changing both <teachers_reviews> and <frontName>teachers_reviews</frontName> to different things like so:


And then tried:


And no matter what I try, Mage::getUrl comes back empty. I can go to example.com/teachers_reviews and I get the Hello World from my class:


class Mycompany_Teachers_IndexController extends Mage_Core_Controller_Front_Action {

    public function indexAction() {
        die('hello world!');

I don't understand why I can't get Mage::getUrl to work.

  • Check ur Mage.php for function getUrl() whether it is commented in any case.. Commented Dec 30, 2014 at 6:05
  • put log inside your indexAction() then check it is logged while trying this action. Commented Dec 30, 2014 at 6:07
  • echo Mage::getUrl? I don't know man, there is nothing wrong with your code. Commented Dec 30, 2014 at 6:18
  • what happens when you do this with some Magento controllers? I seem to see that this should not validate the path but simply format it. If it does not work with standard controllers then I suggest you have something more seriously wrong with your set-up Commented Jan 24, 2015 at 13:38

2 Answers 2


This ended up being a combination of me correcting previous naming issues in the config.xml and changing the router along with those corrections, and then not clearing the cache.

  • Consider accepting a solution if it's solved.
    – WackGet
    Commented Nov 29, 2017 at 19:20

For those suffering a similar problem, check and double-check your module's config.xml for the smallest naming errors, including case sensitivity.

Naming your router <lowercase_whatever> then trying to use getUrl("LowerCase_Whatever/CoolFunction") is not going to work.

When you use the getUrl() function, Magento eventually calls Mage_Core_Controller_Varien_Front::getRouterByRoute(), which tries to load routers in the order of admin routers first; then standard routers; then custom-named routers. That's what <use>standard</use> refers to in the question's XML above.

In this case, it'll try to load a standard router with the name test, thanks to the <test> XML block above. However, if you write it as <test> in the XML, but then call getUrl("Test/whatever") (note the case difference), it'll try (and fail) to load a standard router with the name Test instead.

TL;DR: check your text's case.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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