ZF-11829: Bootstrap causes fatal error when rendering pages from my views/scripts/ folder because it says the file is not there but in reality it is.


So I have the following code in my bootstrap which is located in myproject/application

function _initSetTranslations(){
$layout = $this->getResource('layout');
$view = $layout->getView();

And for example I have the following code in my layout file: <?php echo $this->render('pictureoftheday/pod.phtml') ?>

When running this I get the following error code:

Fatal error: Uncaught exception 'Zend_View_Exception' with message 'script 'pictureoftheday/pod.phtml' not found in path (C:\wamp\www\cluj\application/layouts/scripts/;C:\wamp\www\cluj\application/layouts/scripts/;./views\scripts/)' in C:\wamp\www\cluj\library\Zend\Controller\Plugin\Broker.php on line 336

Now I know the file is not in my layouts/ folder but I also see it tries to check the views/scripts folder as well but the file DOES exist there yet it keeps throwing this error up.


I suspect the problem is in your configuration. If you look closely at the list of paths PHP reports that it tries, you will see this at the end:


Two things wrong with this:

It's a relative path, and I can almost guarantee it won't work

There is mixing of slashes (./views\scripts/ is not necessarily the same as ./view/scripts)

Could you post the view portions of your application.ini file and any bootstrap methods relating to the view?