ContextSwitch makes the assumptions that (a) you are not calling _forward() and (b) that your application code will not throw an exception. 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');
        // ...
    }
}

Posted in: Zend

Related FAQ's

Marius Ion ANGEL HOT SOFT LLC (800) 316-7677