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.

Issue Type: Bug Created: 2011-10-19T11:16:27.000+0000 Last Updated: 2011-10-28T15:41:12.000+0000 Status: Closed Fix version(s): Reporter: Balint (balintd) Assignee: Adam Lundrigan (adamlundrigan) Tags: - zf-caretaker-adamlundrigan

Related issues: Attachments:


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: 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.


Posted by Adam Lundrigan (adamlundrigan) on 2011-10-25T18:04:56.000+0000

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:

<pre class="highlight">

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?

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.