I'm playing around with some forward action and it doesn't seem to work. Here
is the code:
class Mission_AuthController extends Zend_Controller_Action
{
public function testAction()
{
error_log('testaction');
$this->_forward('testtest', 'auth', 'mission');
}
public function testtestAction()
{
echo 'test2';
}
}
This leads to an endless loop. I added an output function at the end of
Zend_Controller_Action->_forward.
$request->setActionName($action);
$request->setDispatched(false);
error_log(print_r($request, true));
}
The output is the following:
[11-Jun-2009 12:18:15] Zend_Controller_Request_Http Object
(
[_paramSources:protected] => Array
(
[0] => _GET
[1] => _POST
)
[_requestUri:protected] => /mission/auth/test
[_baseUrl:protected] =>
[_basePath:protected] =>
[_pathInfo:protected] => /mission/auth/test
[_params:protected] => Array
(
[module] => mission
[controller] => auth
[action] => test
)
[_aliases:protected] => Array
(
)
[_dispatched:protected] =>
[_module:protected] => mission
[_moduleKey:protected] => module
[_controller:protected] => auth
[_controllerKey:protected] => controller
[_action:protected] => testtest
[_actionKey:protected] => action
)
Seems like the _action variable is changed. But the _params are still the
old ones. As far as I can see the front controller takes the params to
choose the action instead of the _* variables. So it calls the test function
endless.
Is this an error or should it be like that?
I'm using ZF 1.8.2.
--
View this message in context:
http://www.nabble.com/_forward-endless-loop--%3E-bug--tp23978774p23978774.html
Sent from the Zend Framework mailing list archive at Nabble.com.