Well its going to fail over to the default module but i think by *BOTH* not
specifying and not including it in the route pattern its not matching the
route to the route you expect - its failing over to the default module route
which assumes the pattern :module/:controller/:action/*

Also, and this maybe the only thing wrong... routes Should not have a
leading slash. hope that helps.


tprinty wrote:
> 
> Hi,
> 
> Thanks for the reply as you can see in the request params it figures out
> the right module. It really goofs up the controller and action though.
> 
> Request Parameters:
> array (
>       'controller' => 'elgin',
>       'action' => 'il',
>       'garage' => 'index',
>       'module' => 'default',
> ) 
> 
> 
> On Wed, 2009-10-28 at 13:25 -0700, prodigitalson wrote:
>> Try adding the module to your default paramters:
>> 
>> $router->addRoute(
>>      'index',
>>      new Zend_Controller_Router_Route(
>>              '/:city/:state/:keyword/', 
>>              array('controller' => 'index', 
>>                    'action' => 'index',
>>                       'module' => 'default'
>>              )
>>      )
>> );
>> 
>> 
>> 
>> tprinty wrote:
>> > 
>> > Hello,
>> > 
>> > I am trying to get some routes to work and having some troubles
>> > 
>> > 
>> > I have a couple routes defined like:
>> > 
>> > 
>> > $router->addRoute(
>> >    'index',
>> >    new Zend_Controller_Router_Route(
>> >            '/:city/:state/:keyword/', 
>> >            array('controller' => 'index', 
>> >                  'action' => 'index'
>> >            )
>> >    )
>> > );
>> > 
>> > //add the route
>> > $controller = Zend_Controller_Front::getInstance();
>> > $controller->setRouter($router);
>> > 
>> > 
>> > 
>> > However when I try the URL
>> > http://example.com/elgin/il/garage/
>> > 
>> > I get the following dump
>> > #0 library/Zend/Controller/Front.php(946):
>> >
>> Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http),
>> > Object(Zend_Controller_Response_Http))
>> > #1 /library/Zend/Application/Bootstrap/Bootstrap.php(77):
>> > Zend_Controller_Front->dispatch()
>> > #2 /library/Zend/Application.php(358):
>> > Zend_Application_Bootstrap_Bootstrap->run()
>> > #3 /public/index.php(26): Zend_Application->run()
>> > #4 {main}  
>> > Request Parameters:
>> > array (
>> >   'controller' => 'elgin',
>> >   'action' => 'il',
>> >   'garage' => 'index',
>> >   'module' => 'default',
>> > )  
>> > 
>> > 
>> > Can anyone offer any suggestions?
>> > 
>> > Thanks
>> > -Tom Printy
>> > 
>> > 
>> > 
>> 
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Using-Zend-Framework-with-interactive-consoles-tp26100554p26101733.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to