Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

100
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda