2

I have been getting 404 error in Magento Admin Controller and i cant seem to figure out what i am doing wrong:

I have this in the config.xml

<!--Admin Controller--> <admin> <routers> <adminhtml> <args> <modules> <example before="Mage_Adminhtml">MasteringMagento_Example_Adminhtml </example> </modules> </args> </adminhtml> </routers> </admin> 

I have this inside my controllers/Adminhtml/ExampleController.php

class MasteringMagento_Example_Adminhtml_ExampleController extends Mage_Adminhtml_Controller_Action { public function indexAction(){ $this->loadLayout(); return $this->renderLayout(); } } 

2 Answers 2

1

I got this to work by changing the Admin Route in the config.hml to this:

 <!--Admin Controller--> <admin> <routers> <adminhtml> <args> <modules> <MasteringMagento_Example before="Mage_Adminhtml">MasteringMagento_Example_Adminhtml</MasteringMagento_Example> </modules> </args> </adminhtml> </routers> </admin> 
1
  • If this solved your problem, please accept your own answer. :) Commented Jun 28, 2017 at 22:44
0

You can try:

<admin> <routers> <example> <use>admin</use> <args> <module>MasteringMagento_Example</module> <frontName>admin_example</frontName> </args> </example> </routers> </admin> 

Controller:

<?php class MasteringMagento_Example_Adminhtml_ExamplebackendController extends Mage_Adminhtml_Controller_Action { protected function _isAllowed() { //return Mage::getSingleton('admin/session')->isAllowed('example/examplebackend'); return true; } public function indexAction() { $this->loadLayout(); $this->_title($this->__("Backend Page Title")); $this->renderLayout(); } } 

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.