ZF2-224: InjectTemplateListener overrides 404 template

Issue Type: Bug Created: 2012-03-15T01:45:32.000+0000 Last Updated: 2012-06-14T21:13:07.000+0000 Status: Resolved Fix version(s): Reporter: Oscar Merida (omerida) Assignee: Matthew Weier O'Phinney (matthew) Tags: - Zend\Mvc

Related issues: Attachments:


What we need to do is one of the following:

  • modify the InjectTemplateListener to not inject a template if a 404 is detected
  • modify ActionController::notFoundAction() to set an explicit template on the returned view model

The former is the easiest route, and allows you to use the site-wide 404 template easily. The second allows for per-controller 404 templates, but would require code for inflecting the module namespace and controller name -- which is currently encapsulated already in the InjectTemplateListener.


Posted by Matthew Weier O'Phinney (matthew) on 2012-04-13T18:51:45.000+0000

Fixed in - please test

Posted by Maks 3w (maks3w) on 2012-06-14T21:13:06.000+0000

PR Merged

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.