True. Thanks for your help Matthew. I fixed the problem.
On Fri, Nov 21, 2008 at 4:08 PM, Matthew Weier O'Phinney <[EMAIL PROTECTED]>wrote: > -- Behzad <[EMAIL PROTECTED]> wrote > (on Friday, 21 November 2008, 12:38 PM +0330): > > Using ZF1.6, I just went to production today, but got the following > error: > > > > Uncaught exception 'Zend_Controller_Action_Exception' with message > > 'ViewRenderer initialization failed: retrieved view base path is empty' > > > > and I'm still struggling to find out the main source of the problem. > Anyone > > could help me? > > Have you ever faced with this error? > > > > By the way, this is the relevant part of the code: > > > > $viewRenderer = > Zend_Controller_Action_HelperBroker::getStaticHelper > > ('viewRenderer'); > > $viewRenderer->initView(); > > $viewRenderer->setViewBasePathSpec(APP_DIR . '/languages/' . > $lang . '/ > > views/:module'); > > $viewRenderer->view > > ->setEncoding('UTF-8') > > ->addHelperPath( > > APP_DIR . '/languages/' . $lang . '/views/' . > > > $this->_frontController->getDispatcher()->getDefaultModule() . > > '/helpers', 'My_View_Helper_') > > ->doctype('XHTML1_STRICT'); > > > > As you see, I've already set the base path, so what's wrong here? > > That exception is called from initView(), which is in turn called from > init() -- which is triggered each time an action controller is > instantiated. The exception is triggered when the ViewRenderer is unable > to determine the path to view scripts for the current module -- > something that would only happen if each of the module, controller, and > action were empty in the request. Considering that the default route > provides defaults, my guess is that you have replaced the default route. > > -- > Matthew Weier O'Phinney > Software Architect | [EMAIL PROTECTED] > Zend Framework | http://framework.zend.com/ > -- Kind regards, -behzad