TalkPHP

TalkPHP (http://www.talkphp.com/forums.php)
-   General (http://www.talkphp.com/general/)
-   -   Invalid controller specified ( error ) when dealing with modules in zend framework. (http://www.talkphp.com/general/4421-invalid-controller-specified-error-when-dealing-modules-zend-framework.html)

Orc 05-21-2009 10:58 AM

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.

Orc 05-21-2009 03:08 PM

New problem, cannot access the actions in the modules controllers.


All times are GMT. The time now is 07:43 AM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0