Default Controller/Action 404 Error #2519

Closed
zfbot opened this Issue Sep 28, 2012 · 2 comments

Comments

Projects
None yet
3 participants

zfbot commented Sep 28, 2012

Jira Information

Original Issue:ZF2-452
Issue Type:Bug
Reporter:diemuzi
Created:08/06/12
Assignee:weierophinney
Components:Zend\View

Description

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

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

zfbot commented Sep 28, 2012

This issue was ported from the ZF2 Jira Issue Tracker at
http://framework.zend.com/issues/browse/ZF2-452

Known GitHub users mentioned in the original message or comment:
@diemuzi, @weierophinney

Contributor

diemuzi commented Sep 28, 2012

Please close, not an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment