05-21-2009, 10:58 AM
|
#1 (permalink)
|
|
The Prestige
Join Date: Dec 2007
Posts: 1,044
Thanks: 193
|
Invalid controller specified ( error ) when dealing with modules in zend framework.
Hi, I set up my file structure in Zend Framework to Modular type, and the one error I'm getting is that it cannot find the ErrorController inside the controllers directory of a module, even though it in fact does exist, and the error action also exists inside.
My error:
Code:
Uncaught exception 'Zend_Controller_Dispatcher_Exception' with message 'Invalid controller specified (error)'
My File structure:
Code:
application/
modules/
frontend/
controllers/
IndexController.php
ErrorController.php
account/
controllers/
IndexController
ErrorController.php
admin/
controllers/
IndexController.php
ErrorController.php
frontend is the default module.
My init method in the bootstrap class:
Code:
public function _initModules(){
$_front = Zend_Controller_Front::getInstance();
$_front->setParam('env', APPLICATION_ENVIRONMENT);
$_front->setControllerDirectory(array(
'frontend' => APPLICATION_PATH . '/modules/frontend/controllers',
'admin' => APPLICATION_PATH . '/modules/admin/controllers',
'account' => APPLICATION_PATH . '/modules/account/controllers',
));
$_front->setDefaultModule('frontend');
$_front->registerPlugin(new APP_Controller_Plugin_ErrorControllerSelector());
}
I also tried this:
http://www.toosweettobesour.com/2008...-framework-15/
Which doesn't seem to help either.
Oh and I also when I access getRequest() in the bootstrap.php class it returns NULL. So I cannot get the module name.
__________________
VillageIdiot can have my babbies ;d
Last edited by Orc : 05-21-2009 at 11:25 AM.
|
|
|
|