ZF-6025: Redirector Helper contains hardcoded action/module/controller parameters
I have implemented a custom routing and my action parameter isn't "action" but something different. This is all handled inside my routing stuff and works just fine. Unfortunately the redirector helper is hardcoded to "action" in setGotoSimple().
The following patch fixes it for me:
--- a/wcp/3rd/Zend/Controller/Action/Helper/Redirector.php +++ b/wcp/3rd/Zend/Controller/Action/Helper/Redirector.php @@ -269,9 +269,9 @@ class Zend_Controller_Action_Helper_Redirector extends Zend_Controller_Action_He } } - $params['module'] = $module; - $params['controller'] = $controller; - $params['action'] = $action; + $params[Zend_Controller_Front::getInstance()->getRequest()->getModuleKey()] = $module; + $params[Zend_Controller_Front::getInstance()->getRequest()->getControllerKey()] = $controller; + $params[Zend_Controller_Front::getInstance()->getRequest()->getActionKey()] = $action; $router = $this->getFrontController()->getRouter(); $url = $router->assemble($params, 'default', true);
I just started with Zend Framework and this might not be the best fix but it works for me ;) But i am sure you get the problem i am facing.