I’m getting the following error when trying to use a modular layout in my Zend Framework application:
Undefined index: authentication in C:\PHP\includes\Zend\Controller\Dispatcher\Standard.php on line 385
The following code runs before this error:
if (!$this->_acl->isAllowed($role, $resource, $privilege)) {
$request->setModuleName('authentication');
$request->setControllerName('auth');
$request->setActionName('login');
$request->setDispatched(false);
}
in my bootstrap, I have:
$frontController
->setParam('environment', $this->environment)
->setControllerDirectory(ROOT_DIR . '/controllers')
->addModuleDirectory(ROOT_DIR . '/modules');
and my directory structure is:
/ application
/ controllers
/ models
/ views
/ library
/ modules
/ Authentication
/ controllers
AuthController.php
Any thoughts why that’s not working?
Case sensitivity? There’s nothing I found in the docs that specifically mentions case sensitivity, but all the examples with modules also show module directory names that are all lowercase.
My own, recent ZF app uses modules and the directory names are all lowercase.
Also, do you have a default module set in your route definitions?