ZF2-342: Forward plugin to another controller throws a routing error

Issue Type: Bug Created: 2012-06-05T15:53:45.000+0000 Last Updated: 2012-08-11T10:54:02.000+0000 Status: Resolved Fix version(s): Reporter: Yonni Mendes (yonman) Assignee: Matthew Weier O'Phinney (matthew) Tags: - Zend\Mvc\Controller

  • controller
  • forward

Related issues: Attachments:


beta4 official package. Using the forward plugin I attempt to dispatch an action on a different controller:

<pre class="highlight"> public function someAction() {
   return $this->forward()->dispatch('SomeOtherController', array('action' => 'anotheraction', 'param' => $value));

The error message returned is:

<pre class="highlight">
 Missing route matches; unsure how to retrieve action

I solved this issue locally by adding the following line to the Forward plugin:

<pre class="highlight">

to line 48 on the Forward.php file

It looks like the new controller was not registering the new event created for the dispatch. Once I added the line, it behaves as expected.


Posted by Demian Katz (demiankatz) on 2012-06-25T18:00:20.000+0000

I ran into a similar problem in beta4, but using the latest version of the forward plugin from the master branch in Git resolved the issue. I believe the event-related changes in revision 14b1343c0ad739e652b1c548a71df6307ed9f376 fixed the problem.

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.