ZF2-452: Default Controller/Action 404 Error

Issue Type: Bug Created: 2012-08-06T22:49:51.000+0000 Last Updated: 2012-10-08T20:16:35.000+0000 Status: Closed Fix version(s): Reporter: Sammie S. Taunton (diemuzi) Assignee: Matthew Weier O'Phinney (matthew) Tags: - Zend\View

Related issues: Attachments:


When you setup a Module and configure the route (See Example)


'manage' => array( 'type' => 'segment', 'options' => array( 'route' => '/manage[/:action]', 'constraints' => array( 'action' => '[a-zA-Z][a-zA-Z0-9_-]*', ), 'defaults' => array( 'controller' => 'Manage\Controller\Manage', 'action' => 'index', ), ), ),

If the default action does not exist, a blank page is rendered. I would expect a 404 error message.

In the error log you are presented with the following: PHP Fatal error: Uncaught exception 'Zend\View\Exception\RuntimeException' with message 'Zend\View\Renderer\PhpRenderer::render: Unable to render template "manage/manage/index"; resolver could not resolve to a file' in /backup/domains/devel/vendor/Zend/View/Renderer/PhpRenderer.php:451 Stack trace:

0 /backup/domains/devel/vendor/Zend/View/View.php(203): Zend\View\Renderer\PhpRenderer->render(Object(Zend\View\Model\ViewModel))

1 /backup/domains/devel/vendor/Zend/View/View.php(230): Zend\View\View->render(Object(Zend\View\Model\ViewModel))

2 /backup/domains/devel/vendor/Zend/View/View.php(196): Zend\View\View->renderChildren(Object(Zend\View\Model\ViewModel))

3 /backup/domains/devel/vendor/Zend/Mvc/View/Http/DefaultRenderingStrategy.php(128): Zend\View\View->render(Object(Zend\View\Model\ViewModel))

4 [internal function]: Zend\Mvc\View\Http\DefaultRenderingStrategy->render(Object(Zend\Mvc\MvcEvent))

5 /backup/domains/devel/vendor/Zend/EventManager/EventManager.php(469): call_user_func(Array, Object(Zend\Mvc\MvcEvent))

6 in /backup/domains/devel/vendor/Zend/View/Renderer/PhpRenderer.php on line 451


Posted by Ralph Schindler (ralph) on 2012-10-08T20:16:35.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.