Issue Type: Bug Created: 2008-02-10T11:36:31.000+0000 Last Updated: 2008-03-16T08:16:51.000+0000 Status: Resolved Fix version(s): Reporter: julien PAULI (doctorrock83) Assignee: julien PAULI (doctorrock83) Tags: - Zend_Controller
Related issues: - ZF-1808
Attachments: - Zend_Controller_Dispatcher_Standard-2.patch
Assuming the simple following boostrap :
<pre class="highlight"> // ... some easy minimal code here $frontController = Zend_Controller_Front::getInstance(); $frontController->addControllerDirectory($appDir . '/main/controllers','main'); $frontController->dispatch();
If I would like the 'main' module to be the default one, I should have written $frontController->setDefaultModule('main'); But I don't, I assume dispatcher will find it on its own.
If all right, then Dispatcher will dispatch my 'main' module (namespaced, that's correct as it's not declared as being the default module) but it will show some notices : Notice: Undefined index: default in path/to/Zend/Controller/Dispatcher/Standard.php on line 330
I think that the default module should be always set (id 'default' then the directory must exist or any declared with setDefaultModule()), and Dispatcher should throw an exception if it's not the case.
See the patch attached, that redefines the getActionMethod() for that. it seems to break some tests, maybe that's not a good patch, I'm on it.
Posted by julien PAULI (doctorrock83) on 2008-02-10T12:38:54.000+0000
This patch looks better
Posted by julien PAULI (doctorrock83) on 2008-02-11T11:57:01.000+0000
Here are the tests for the second patch.
Posted by Matthew Weier O'Phinney (matthew) on 2008-02-20T11:08:02.000+0000
Resolved in trunk. Passing the front controller or dispatcher parameter 'prefixDefaultModule' will ensure the controllers in the default module are namespaced.
Have you found an issue?
See the Overview section for more details.