Hi Xander,

There is no such route called 'logout'.

As your route you are trying to access is nested under the 'home' route,
you have to reference the route as 'home/logout' where necessary.

Also, you only need to include 'may_terminate' => true, if your route has
child_routes AND you want to be able to use the parent route. Using it for
routes on tips is unnecessary.

Cheers,

Michael Gooden


On 9 May 2013 04:37, Xander Guzman <thesha...@shadowpedia.info> wrote:

> I'm getting: Route with name "logout" not found' and I can't figure out
> why, below you'll find a copy of my route configuration any help would be
> appreciated.
>
>     'router' => array(
>         'routes' => array(
>             'home' => array(
>                 'type' => 'Zend\Mvc\Router\Http\Literal',
>                 'options' => array(
>                     'route'    => '/',
>                     'defaults' => array(
>                         'controller' => 'Application\Controller\Index',
>                         'action'     => 'index',
>                     ),
>                 ),
>                 'may_terminate' => true,
>                 'child_routes' => array(
>                     'campaigns' => array(
>                         'type'    => 'Zend\Mvc\Router\Http\Literal',
>                         'options' => array(
>                             'route' => 'campaigns',
>                             'defaults' => array(
>                                 'controller' =>
> 'Application\Controller\Campaigns',
>                                 'action'     => 'index',
>                             ),
>                         ),
>                         'may_terminate' => true,
>                         'child_routes' => array(
>                             'campaign-profile' => array(
>                                 'type'    =>
> 'Zend\Mvc\Router\Http\Segment',
>                                 'options' => array(
>                                     'route'    => '/:campaign-slug',
>                                     'defaults' => array(
>                                         'action' => 'campaign',
>                                     ),
>                                 ),
>                                 'may_terminate' => true,
>                             ),
>                         ),
>                     ),
>                     'users' => array(
>                         'type' => 'Zend\Mvc\Router\Http\Literal',
>                         'options' => array(
>                             'route' => 'users',
>                             'defaults' => array(
>                                 'controller' =>
> 'Application\Controller\Users',
>                                 'action'     => 'users',
>                             ),
>                         ),
>                         'may_terminate' => true,
>                     ),
>                     'signup' => array(
>                         'type' => 'Zend\Mvc\Router\Http\Literal',
>                         'options' => array(
>                             'route' => 'signup',
>                             'defaults' => array(
>                                 'controller' =>
> 'Application\Controller\Users',
>                                 'action'     => 'signup',
>                             ),
>                         ),
>                         'may_terminate' => true,
>                     ),
>                     'login' => array(
>                         'type' => 'Zend\Mvc\Router\Http\Literal',
>                         'options' => array(
>                             'route' => 'login',
>                             'defaults' => array(
>                                 'controller' =>
> 'Application\Controller\Users',
>                                 'action'     => 'login',
>                             ),
>                         ),
>                         'may_terminate' => true,
>                     ),
>                     'logout' => array(
>                         'type' => 'Zend\Mvc\Router\Http\Literal',
>                         'options' => array(
>                             'route' => 'logout',
>                             'defaults' => array(
>                                 'controller' =>
> 'Application\Controller\Users',
>                                 'action'     => 'logout',
>                             ),
>                         ),
>                         'may_terminate' => true,
>                     ),
>                     'sessions' => array(
>                         'type' => 'Zend\Mvc\Router\Http\Literal',
>                         'options' => array(
>                             'route' => 'sessions',
>                             'defaults' => array(
>                                 'controller' =>
> 'Application\Controller\Users',
>                                 'action'     => 'sessions',
>                             ),
>                         ),
>                         'may_terminate' => true,
>                     ),
>                 ),
>             ),
>         ),
>     ),
>

Reply via email to