I am getting a 404 message within the body of the index and magento connect admin pages. When I remove the module that I recently added, they come back. Can you see what is wrong with my module that is causing this issue? I got the files from this tutorial.



class Caitlinhavener_Addschool_Block_ShowTabsAdminBlock extends Mage_Adminhtml_Block_Widget_Tabs
    public function __construct()

         * By default DestElementId = 'content'... if you trace the function you will see.
         * Meaning, it responds to layout block name?! like "content", "footer", "left"... 
         * Its basicaly telling the layout where to output tabs canvas aka display area

        $this->setTitle(Mage::helper('coffefreakhelper1')->__('Add Schools'));

    protected function _beforeToHtml()
       /* $this->addTab('custom_assigned_tab1_id_name', array(
            'label'     => Mage::helper('coffefreakhelper1')->__('Custom tab1 here'),
            'title'     => Mage::helper('coffefreakhelper1')->__('My custom tab1 title here'),
            'content'   => 'Some content here. We could add direct string here, or we can use something like $this->getLayout()->createBlock("adminhtml/cms_page_edit_tab_main")->toHtml()',
            'active'    => true

        $this->addTab('custom_aka_freely_assigned_tab2_id_name', array(
            'label'     => Mage::helper('coffefreakhelper1')->__('Custom tab2 here'),
            'title'     => Mage::helper('coffefreakhelper1')->__('My custom tab2 title here'),
            'content'   => 'Another content here. As mentioned, we could add direct string here, or we can use something like $this->getLayout()->createBlock("adminhtml/cms_page_edit_tab_main")->toHtml()',
            'active'    => false

        $this->addTab('custom_aka_freely_assigned_tab3_id_name', array(
            'label'     => Mage::helper('coffefreakhelper1')->__('Custom tab3 here<br />(usses class block)'),
            'title'     => Mage::helper('coffefreakhelper1')->__('My custom tab3 title here'),
            'content'   => $this->getLayout()->createBlock("coffefreakblock2/SampleBlockForTabAreaShowoff")->toHtml(),
            'active'    => false
        ));  */  

        $this->addTab('custom_aka_freely_assigned_tab4_id_name', array(
            'label'     => Mage::helper('coffefreakhelper1')->__('Add Public School'),
            'title'     => Mage::helper('coffefreakhelper1')->__('Add Public School'),
            'content'   => $this->getLayout()->createBlock("coffefreakblock1/SampleBlockForTabAreaShowoffWithExtraInfo")->toHtml(),
            'active'    => false

        return parent::_beforeToHtml();



class Caitlinhavener_Addschool_AdminControllersHere_FreakOutController extends Mage_Adminhtml_Controller_Action
    public function indexAction()
        //Get current layout state

        //Create core block based on inchoo/example_core_block.phtml template (view) file
        //Note the location "adminhtml"... needs to be there since this is admin controller
        $block = $this->getLayout()->createBlock(
            array('template' => 'Caitlinhavener/example_core_block.phtml')

        //Below example does the same thing, and looks cooler :)

        //Release layout stream... lol... sounds fancy

same folder FreakOutController2.php:


class Caitlinhavener_Addschool_AdminControllersHere_FreakOut2Controller extends Mage_Adminhtml_Controller_Action
    public function indexAction()

        $block = $this->getLayout()->createBlock(
            array('template' => 'Caitlinhavener/example_core_block.phtml')





<?xml version="1.0"?>





                        <sintax after="Caitlinhavener_Addschool_AdminControllersHere">Mage_Adminhtml</sintax>



             <mymenu1 translate="title" module="coffefreakhelper1">
                <!-- Note the misleading "module" attribute. 
                    It actualy refers to one of the declared helpers -->

                    <!--<myitem1 translate="title" module="coffefreakhelper1">
                        <title>Simple one column layout with custom template file assigned for view</title>

                    <myitem2 translate="title" module="coffefreakhelper1">
                        <title>Add Schools</title>



2 Answers 2


Your <routers> configuration is incorrect. As guessed at, your configuration is telling Magento to use your module as a place to look for admin controllers. When it can't find them, it gets sad.


  • <samplerouter1/> should be <adminhtml/>
  • Remove the <module>Caitlinhavener_Addschool_AdminControllersHere</module> tag, it's not needed
  • Remove the <frontName>admin</frontName> tag, it's not needed

More information at

  • Changing samplerouter tag to adminhtml makes the index page return but when I click into the module page it redirects to the frontend 404 message. Aug 6, 2013 at 17:35
  • Which means Magento's having trouble finding your controller files. There's debugging information in the above linked articles. Aug 6, 2013 at 17:36
  • If you get a chance : magento.stackexchange.com/questions/6559/… :) Aug 8, 2013 at 17:27

Do not Remove the "Caitlinhavener_Addschool_AdminControllersHere" In the action use: adminhtml/FreakOut

Move the module from the "community" folder to "local" folder. Change the codepool (in etc/modules .xml) from community to local.

Works perfect with Magento

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.