skip to Main Content

I’m trying to fire a method on a controller but for some reason is giving me a 404, everything looks ok, but is not working.

config.xml:

<admin>
    <routers>
        <adminhtml>
            <args>
                <modules>
                    <cloud_magni before="Mage_Adminhtml">Cloud_Magni_Adminhtml</cloud_magni>
                </modules>
            </args>
        </adminhtml>
    </routers>
</admin>

And here is my controller app/code/local/Cloud/Magni/controllers/Adminhtml/IndexController.php

class Cloud_Magni_Adminhtml_IndexController extends Mage_Adminhtml_Controller_Action
{

    public function indexAction(){
        echo "From Administration";
    }
}

Than i try to access here the route path but nothing:

someurldomain/index.php/admin/magni/index

2

Answers


  1. Everything looks good, but you’re accessing wrong route path,so please use following route path

    someurldomain/index.php/admin/index/index/
    

    It will be work for you.

    Login or Signup to reply.
  2. I usually run into problems like these and now have a list of steps to check:

    1. Make sure the URL is correct (you don’t need index if you want the controller to run index action)

      someurldomain/index.php/admin/[module_name]/[controller_name]/
      
    2. Clear the cache, then log out to clear the permission cache, and log back in

    3. Make sure ACL is set up correctly or if you’re allowed to access the controller or not, check your adminhtml section or check app/code/community/[namespace]/[module]/etc/adminhtml.xml

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search