Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

99
Views
The requested controller was unable to dispatch the request

Hi, im newbie in Zend Framework and have been developing a Application so that i can get more familiar with it.
The Application has Authentication and Session treatment plus a Users Management for the admin(User Module).
The Application also has a module for "Modules" with the actions "admin", "add", "view", "edit" and "delete".
My index view prints out all modules order by id but since the list of modules contains more than 30 modules, it would be better for page to have a filtering by Module Category.
My logic was to create a action function for filtering in the ModuleController(where all the other actions are), declare it in my "module.config.php" under the "acess_filter" array :

 'access_filter' => [
    'options' => [
        'mode' => 'restrictive'
    ],
    'controllers' => [
        Controller\IndexController::class => [
            // Allow anyone to visit "index" and "about" actions
            ['actions' => ['index', 'about'], 'allow' => '*'],
            // Allow authorized users to visit "settings" action
            ['actions' => ['settings'], 'allow' => '@']
        ],
        Controller\ModuloController::class => [
            ['actions' => ['admin'], 'allow' => '*'],
            ['actions' => ['admin', 'view', 'view_comu','add','edit','delete'], 'allow' => '@']

        ],
    ]
],

When i tried to access the module action this error prompt:
"The requested controller was unable to dispatch the request.

Controller: Application\Controller\ModuloController "

Did i miss something?

over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

You are probably missing another controllers key somewhere in your configuration (the root controllers key that contains the configuration for the controllers container).

It should look like this:

return [
    'controllers' => [
        'factories' => [
            Controller\IndexController::class => Controller\IndexControllerFactory::class,
            Controller\ModuloController::class => Controller\ModuloControllerFactory::class,
        ],
    ],
];
over 4 years ago · Santiago Trujillo Report

0

This error can also appear if you write the path in the address bar like /path/to/controller and don't specify the default action when you set may_terminate = true. Adding action to the path, like /path/to/controller/action, solves the problem.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!