brunitto wrote:As the error indicates, Zend is trying to render a 'head.tpl' file. Are you using third part templates?
Your ini.php is fine - you can sanitize by adding:
- Code: Select all
return array (
'resources' => array(
...
'layout' => array(
'layout' => 'index',
'layoutPath' => APPLICATION_PATH . '/layouts/scripts',
'viewSuffix' => 'phtml'
)
)
...
);
As you may know, you must have a file named 'index.phtml' within your APPLICATION_PATH/layouts/scripts directory.
No I've not used third party template just determine .tpl suffix for view templates scripts.
The problem is after add path to view it is string Array:
Fatal error: Uncaught exception 'Zend_View_Exception' with message 'script 'head.tpl' not found in path (G:\WebServer\www\beta\application\modules\users\layouts\scripts\;G:\WebServer\www\beta\application\modules\default\views\scripts\;G:\WebServer\www\beta\application\modules\users\layouts\scripts\;G:\WebServer\www\beta\application\modules\users\views\scripts\;
Array\;.\views\scripts\)'
and therefore the view script head can be find!
in Zend_Application_Module_Bootstrap
- Code: Select all
...
$view = $layout->getView();
echo "<br /> before addScriptPath <br />";
$paths = $view->getScriptPaths();
foreach ($paths as $p) {
echo $p . "<br/>";
}
//Add paths
foreach ($app['layout']['paths'] as $path) {
echo 'added script - ' . $path;
$view->addScriptPath($app);
}
echo "<br /> after addScriptPath <br />";
$paths = $view->getScriptPaths();
foreach ($paths as $p) {
echo $p . "<br/>";
}
exit;
...
Output:
before addScriptPath
.\views\scripts\
added script - G:\WebServer\www\beta\application/layouts/scripts
after addScriptPath
Array\
.\views\scripts\
And after we can see
Array\ - path, not G:\WebServer\www\beta\application/layouts/scripts