|
I'm having a noroute issue with a specific route.
Im trying to override the default action in the rewrite router to take :action
only.
$router->addRoute('defaultaction',':action',
array('controller'=>'index','action' => 'index'));
But this throws errors when it hits a
non-routeable action, instead of calling noRouteAction instead. (ie
/nonexistantaction throws
Array
Fatal error: Uncaught exception 'Zend_Controller_Action_Exception' with message 'IndexController::nonexistantactionAction() does not exist and was not trapped in __call().' in /usr/local/www/ZendFramework-0.1.5/library/Zend/Controller/Action.php:92 Stack trace: #0 /usr/local/www/ZendFramework-0.1.5/library/Zend/Controller/Action.php(114): Zend_Controller_Action->__call('nonexistantacti...', Array) #1 /usr/local/www/ZendFramework-0.1.5/library/Zend/Controller/Dispatcher.php(185): Zend_Controller_Action->run(Object(Zend_Controller_Dispatcher), Object(Zend_Controller_Dispatcher_Token)) #2 /usr/local/www/ZendFramework-0.1.5/library/Zend/Controller/Dispatcher.php(136): Zend_Controller_Dispatcher->_dispatch(Object(Zend_Controller_Dispatcher_Token), true) #3 /usr/local/www/ZendFramework-0.1.5/library/Zend/Controller/Front.php(254): Zend_Controller_Dispatcher->dispatch(Object(Zend_Controller_Dispatcher_Token)) #4 /usr/local/www/ZendFramework-0.1.5/library/Zend/Controller/Front.php(106): Zend_Controller_Front->dispatch() #5 /usr/l in /usr/local/www/ZendFramework-0.1.5/library/Zend/Controller/Action.php on line 92 Im using 0.1.5.
The default route (':controller/:action')
pretends that controller name is the provided name when there is only one param
provided. This is a stupidly simple site and
the default /controller and indexAction arent really appropriate. (would have a
dozen or so nearly-identical controllers each with one indexaction
only)
I guess what I'm wondering is, is this a bug with
the rewriterouter or just a bad route or both? Solution?
Kevin McArthur
|
- [fw-general] Router issue? Kevin McArthur
- Re: [fw-general] Router issue? Martel Valgoerad

