TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 05-21-2009, 10:58 AM   #1 (permalink)
Orc
The Prestige
 
Orc's Avatar
 
Join Date: Dec 2007
Posts: 1,044
Thanks: 193
Orc is on a distinguished road
Default 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.
Orc is offline  
Reply With Quote
Old 05-21-2009, 03:08 PM   #2 (permalink)
Orc
The Prestige
 
Orc's Avatar
 
Join Date: Dec 2007
Posts: 1,044
Thanks: 193
Orc is on a distinguished road
Default

New problem, cannot access the actions in the modules controllers.
__________________
VillageIdiot can have my babbies ;d
Orc is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Zend Framework Tanax General 21 03-23-2009 07:07 PM
Zend Studio code completion framework Devels General 1 09-06-2008 05:04 PM
Zend Framework in Action (book) freenity The Lounge 2 04-06-2008 11:12 AM
Zend Framework 1.5 Devels Libraries & Extensions 5 03-17-2008 03:06 PM
Zend Framework - questions questions abiko Advanced PHP Programming 4 02-29-2008 12:46 AM


All times are GMT. The time now is 05:41 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design