InterviewSolution
| 1. |
I'm Using The Contextswitch Or Ajaxcontext View Helper And Receiving An Exception Indicating The Error.ajax.phtml View Script Is Missing What Am I Doing Wrong? |
|
Answer» ContextSwitch makes the assumptions that
If you see the above error; your code is throwing an exception - but the context is still in PLAY, and the ViewRenderer is simply trying to load a view script for the current context from the ErrorController. The easiest way to fix the SITUATION is to have the ErrorController::errorAction() redefine the view script SUFFIX, as follows: CLASS ErrorController extends Zend_Controller_Action { public function errorAction() { $this->_helper->viewRenderer->setViewSuffix(’phtml’); //… } }ContextSwitch makes the assumptions that If you see the above error; your code is throwing an exception - but the context is still in play, and the ViewRenderer is simply trying to load a view script for the current context from the ErrorController. The easiest way to fix the situation is to have the ErrorController::errorAction() redefine the view script suffix, as follows: |
|