ZF2-408: Segment route bug

Issue Type: Bug Created: 2012-07-18T22:51:00.000+0000 Last Updated: 2012-10-08T20:16:36.000+0000 Status: Closed Fix version(s): Reporter: David Windell (outeredge) Assignee: Ben Scholzen (dasprid) Tags: - Zend\Mvc\Router

  • routing

Related issues: - ZF2-407



We have this Segment route configured;

<pre class="highlight"> 

Which works OK for:

<pre class="highlight">
but NOT for: 

I assume this is a bug in the Segment route?


Posted by Ben Scholzen (dasprid) on 2012-07-19T11:16:44.000+0000

Could you please be more specific than just "doesn't work"?

Posted by David Windell (outeredge) on 2012-07-19T11:37:00.000+0000

Sorry, it results in a 404 Error (The requested controller was unable to dispatch the request.)

Posted by Ben Scholzen (dasprid) on 2012-07-19T13:06:46.000+0000

Could you please post the complete route definition, including options?

Posted by David Windell (outeredge) on 2012-07-19T13:15:24.000+0000

<pre class="highlight">
                 'child_routes' => array(
                    'admin' => array(
                        'type' => 'Literal',
                        'options' => array(
                            'route'    => '/admin',
                            'defaults' => array(
                                'controller' => 'Application\Controller\AdminController',
                                'action'    => 'index'
                        'may_terminate' => true,
                        'child_routes' => array(
                            'contact' => array(
                                'type' => 'Segment',
                                'options' => array(
                                    'route'    => '/contact[/:action[/:mode]][/page/:page]',
                                    'constraints' => array(
                                        'mode' => 'all',
                                        'id' => '[1-9][0-9]*',
                                        'page' => '[1-9][0-9]*',
                                    'defaults' => array(
                                        'controller' => 'Application\Controller\ContactController',
                                        'action'     => 'list',

Posted by Ben Scholzen (dasprid) on 2012-07-19T13:22:16.000+0000

I seeā€¦ I think I know where this bug comes from (it is already reported). Will look into it somewhen around this week.

Posted by Ralph Schindler (ralph) on 2012-10-08T20:16:36.000+0000

This issue has been closed on Jira and moved to GitHub for issue tracking. To continue following the resolution of this issues, please visit:

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.