The ViewRenderer currently checks the path stack to see if a path exists prior to adding it. This is causing a small bug for me.

If module*1*-controller1-action1 forwards to module*2*-controller1-action1, which then forwards back to module*1*-controller1-action1, the view path stack is incorrect. The path for module*1 *views is never unshifted back onto the path stack (as it already exists in there), so when rendered, it renders the views from module*2*.

*Current Stack Result:*
array(2) {

 [0] => string(76) "/directory/module*2*/views/scripts/"
 [1] => string(76) "/directory/module*1*/views/scripts/"
}

*Expected Stack Result:*
array(3) {

 [0] => string(76) "/directory/module*1*/views/scripts/"
 [1] => string(76) "/directory/module*2*/views/scripts/"
 [2] => string(76) "/directory/module*1*/views/scripts/"
}

*Or*
array(3) {

 [0] => string(76) "/directory/module*1*/views/scripts/"
 [1] => string(76) "/directory/module*2*/views/scripts/"
}


What I'm trying to accomplish is actions firing in a *specific *sequence. If we are out of sequence, need to forward to the correct action and then come back.

Simple fix is to just add paths to the view script stack WITHOUT checking if it first exists. That is my current temp fix (I just commented out $pathExists = true).

Otherwise, another fix would be, if the path exists, push it to the top of the stack.

Could somebody let me know if this is expected behavior and if I'm doing something out of whack?

Thanks.

Arthur

Reply via email to