ZF-3812: Zend_Controller_Action_Helper_ActionStack does not preserve Request Parameters
Description
The ActionStack Action Helper accepts a parameter list similar to the Url View Helper and gotoRoute() method of the Redirector Action Helper, but it does not preserve Request Parameters like its cousins. Example:
$this->_helper->ActionStack->actionToStack($action);
One would expect the Request object pushed onto the ActionStack to have the requested $action, the current Controller and Module specifications AND the current Request Parameters, but it ignores the params completely. Instead, workaround with:
$this->_helper->ActionStack->actionToStack($action, null, null, $this->_getAllParams();
I also have a patch to submit for ActionStack that addresses this frustrating behavior AND permits the developer to selectively pass params in an predictable manner. I'll attach that to the ticket once it's created.
Comments
Posted by David Rogers (al_the_x) on 2008-07-30T20:35:59.000+0000
The use case for this patch is simple: "Rather than having to always pass the Request parameters to ActionStack::actionToStack(), collect the existing Request params if $params is not passed but allow a null set (empty array) to be passed for $params."
Uses:
Posted by David Rogers (al_the_x) on 2008-07-30T20:37:23.000+0000
Just correcting my JIRA wiki syntax. Why are there so many of these...!?
Posted by Matthew Weier O'Phinney (matthew) on 2008-11-05T10:46:55.000+0000
Assigning to Ralph.
Posted by Rob Allen (rob) on 2012-11-20T20:53:10.000+0000
Bulk change of all issues last updated before 1st January 2010 as "Won't Fix".
Feel free to re-open and provide a patch if you want to fix this issue.