ZF-5240: ZF tries to use default viewscript when forwarding to an action instead of using one specified in viewRenderer helper of that action.


When forwarding to an action that changes the default viewscript via {{$this->_helper->viewRenderer('viewscriptname')}}, ZF tries to use the default viewscript for that new action. I didn't have a viewscript with the default name "index.phtml" for the indexAction that I forwarded to, so ZF threw exception:

{{Zend_View_Exception: script 'newaction/index.phtml' not found in path...}}

..when it should be using 'viewscriptname.phtml' since in the indexAction I have the line: {{$this->_helper->viewRenderer('viewscriptname');}}


set component and auto reassign

There might be some problem with the order of operations. Can you please provide us with test code?

Ideally, code for the whole controller that misbehaves.

Duplicate of ZF-3447. Please direct updates to that ticket.