Issues

ZF-8246: Zend_Layout and Zend_View Exception when using breadcrumbs

Description

I'm having problems with the folowing code in layout.phtml:

Line 25:    

You are here:
<?php echo $this->navigation()->breadcrumbs()->render(); ?>

Line 26: <?php echo $this->layout()->content;/* do the /actual/ rending of the page */ ?>

It does throw this error(using a custom error displaying function):

Message: fopen(Zend/View/Helper/Navigation/Layout.php) [function.fopen]: failed to open stream: No such file or directory

Code: 0

File: /var/www/td/zend_framework/library/Zend/Loader.php

Line: 165

Trace:

#0 [internal function]: exception_error_handler('Zend/View/Helpe...', 'r', true)
#1 /var/www/td/zend_framework/library/Zend/Loader.php(165): fopen('Zend/View/Helpe...')
#2 /var/www/td/zend_framework/library/Zend/Loader/PluginLoader.php(383): Zend_Loader::isReadable('Layout')
#3 /var/www/td/zend_framework/library/Zend/View/Abstract.php(1118): Zend_Loader_PluginLoader->load('helper', 'layout')
#4 /var/www/td/zend_framework/library/Zend/View/Abstract.php(569): Zend_View_Abstract->_getPlugin('layout')
#5 /var/www/td/zend_framework/library/Zend/View/Abstract.php(336): Zend_View_Abstract->getHelper('layout', Array)
#6 [internal function]: Zend_View_Abstract->__call()
#7 /var/www/td/zend_framework/application/layouts/scripts/layout.phtml(26): Zend_View->layout('/var/www/td/zen...')
#8 /var/www/td/zend_framework/library/Zend/View.php(108): include('/var/www/td/zen...')
#9 /var/www/td/zend_framework/library/Zend/View/Abstract.php(833): Zend_View->_run('layout.phtml')
#10 /var/www/td/zend_framework/library/Zend/Layout.php(793): Zend_View_Abstract->render()
#11 /var/www/td/zend_framework/library/Zend/Layout/Controller/Plugin/Layout.php(142): Zend_Layout->render(Object(Zend_Controller_Request_Http))
#12 /var/www/td/zend_framework/library/Zend/Controller/Plugin/Broker.php(331): Zend_Layout_Controller_Plugin_Layout->postDispatch(Object(Zend_Controller_Request_Http))
#13 /var/www/td/zend_framework/library/Zend/Controller/Front.php(957): Zend_Controller_Plugin_Broker->postDispatch()
#14 /var/www/td/public_html/index.php(58): Zend_Controller_Front->dispatch()
#15 {main}

Commenting out one of those lines or switching the place of the lines will not generate that error. I know version 1.9.5 is affected but not about the other. I'm using the modular stucture and MVC.

As the exception is about a file not found I investigated a little more. The following file is required but does not exists in the package:

Zend/View/Helper/Navigation/Layout.php

However the following does:

Zend/View/Helper/Layout.php

The error only appear when calling line 25 before line 26 and does not appear when switching place of the lines.

More information can be given upon request.

Comments

This would be a problem with the include path you're using. With the few lines you posted here I was not able to reproduce this issue. Therefore closing as such.

These are the include paths: /var/www/td/zend_framework/library:/var/www/td/zend_framework/application:.:/usr/share/php:/usr/share/pear

As the exception is about a file not found I investigated a little more. The following file is required but does not exists in the package:


However the following does:

The error only appear when calling line 25 before line 26 and does not appear when switching place of the lines. This isn't the expected behavior and I would therefore request a reopening of this issue.

Then reopened and reassigned it is.

Has anybody tried to solve this issue? Getting same error on version 1.10.8 Could also mention that Zend_Loader tries to load /Zend/View/Helper/Navigation/GetMessages.php which produces the following warning: {{monospaced}} Warning: is_readable() [function.is-readable]: open_basedir restriction in effect. File(/Zend/View/Helper/Navigation/GetMessages.php) is not within the allowed path(s): (/var/www/vhosts/domain/subdomains/hurepo.demo/httpdocs:/tmp) in /var/www/vhosts/domain/subdomains/hurepo.demo/httpdocs/library/Zend/Loader.php on line 198 {{monospaced}}

<?= $this->navigation()->breadcrumbs() ?> <?= $this->layout()->content ?>

Sorry, we cannot reproduce the problem. Feel free to reopen the issue, if you can provide an example.