by name 'Dojo' was not found in the registry" when there is *no* Dojo
elements in the view !
It fails in layout when : if ($this->dojo()->isEnabled()) {.....}
The error notice :
2009-10-01T09:06:25+02:00 DEBUG (7): Plugin by name 'Dojo' was not found in
the registry; used paths: ( see the "/" and "\" . Where do they comes from ?
)
Zend_View_Helper_:
Zend/View/Helper/;./views\helpers/;C:/travail/www/vivier/application/modules/default/views\helpers/
#0 C:\travail\www\vivier\library\Zend\View\Abstract.php(1118):
Zend_Loader_PluginLoader->load('Dojo')
// index.php
<?php
defined('APPLICATION_PATH')
|| define('APPLICATION_PATH', realpath(dirname(__FILE__) .
'/../application'));
defined('LIBRARY_PATH')
|| define('LIBRARY_PATH', realpath(dirname(__FILE__) . '/../library'));
defined('LOGFILES_PATH')
|| define('LOGFILES_PATH', realpath(dirname(__FILE__) .
'/../logfiles'));
defined('APPLICATION_ENV')
|| define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ?
getenv('APPLICATION_ENV') : 'production'));
set_include_path(implode(PATH_SEPARATOR, array(
realpath(APPLICATION_PATH . '/../library'),
get_include_path(),
)));
/** Zend_Application */
require_once 'Zend/Application.php';
// Create application, bootstrap, and run
$application = new Zend_Application(
APPLICATION_ENV,
APPLICATION_PATH . '/configs/application.ini'
);
$application->bootstrap()
->run();
// application.ini
[production]
phpSettings.display_startup_errors = 0
phpSettings.display_errors = 0
bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
bootstrap.class = "Bootstrap"
resources.frontController.controllerDirectory = APPLICATION_PATH
"/controllers"
autoloaderNamespaces[] = "App_"
resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"
resources.frontController.defaultControllerName = "index"
resources.frontController.defaultAction = "index"
resources.frontController.defaultModule = "default"
resources.frontController.prefixDefaultModule = true
resources.frontController.plugins.layout = "Plugin_ModuleLayout"
resources.frontController.plugins.modulesetup = "Plugin_ModuleSetup"
resources.layout.layoutpath = APPLICATION_PATH "/layouts"
resources.db.adapter = "PDO_MYSQL"
resources.db.params.host = "localhost"
resources.db.params.username = "vivier"
resources.db.params.password = "vivier"
resources.db.params.dbname = "vivier"
resources.db.params.date_format = "YYYY-MM-ddTHH:mm:ss"
resources.db.params.charset = "UTF8"
resources.db.isDefaultTableAdapter = true
; View
resources.view[]=""
// bootstrap.php
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
protected function _initAutoload()
{
$loader = new Zend_Application_Module_Autoloader(array(
'namespace' => '',
'basePath' => APPLICATION_PATH));
return $loader;
}
protected function _initView()
{
$view = new Zend_View();
$view->setEncoding('UTF-8');
$view->doctype('XHTML1_STRICT');
// Helper DOJO
$view->addHelperPath('Zend/Dojo/View/Helper/','Zend_Dojo_View_Helper');
$view->headMeta('Vivier des Candidatures, TOS','keywords')
->headMeta('Content-Type','text/html; charset=utf-8')
->headMeta()->appendHttpEquiv('Content-Language', 'fr');
$view->headTitle(App_Globals::getConfig()->title);
$view->headLink()->appendStylesheet(App_Globals::getConfig()->css->file,
'screen, projection, print');
$viewRenderer = new Zend_Controller_Action_Helper_ViewRenderer();
$viewRenderer->setView($view);
return $view;
}
}
// Layout default.phtml
<?php echo $this->partial('header.phtml') ?>
<body class="<?php echo App_Globals::getConfig()->css->theme; ?>" >
<?php echo $this->partial('bandeauaccueil.phtml') ?>
<?php echo $this->partial('bandeaumenu.phtml') ?>
</div>
<div id="middle">
<div id="left-column">
<h3>Header</h3>
etc. .....
// Header.phtml
<?php header('Content-type: text/html; charset=UTF-8'); ?>
<?php echo '<?xml version="1.0" encoding="UTF-8" ?>' ; ?>
<?php echo $this->docType() ?>
<html xmlns="http://www.w3.org/1999/xhtml" lang="fr" xml:lang="fr">
<head>
<?PHP echo $this->headTitle()->setIndent(4); ?>
<?PHP echo $this->headMeta()->setIndent(4);?>
<?PHP echo $this->headLink()->setIndent(4);?>
<?PHP echo $this->headStyle()->setIndent(4);?>
<?PHP
// ==> Error here where there is *no* Dojo element in the view !!!!
if ($this->dojo()->isEnabled())
{
$theme = "dijit.themes." . App_Globals::getConfig()->css->theme ;
$dojofile = App_Globals::getConfig()->css->dojofile ;
$this->dojo()->setLocalPath($dojofile)
->setDjConfigOption('locale','fr')
->addStyleSheetModule($theme);
echo $this->dojo();
}
//endif;
echo $this->headScript()->setIndent(4); ?>
</head>
Thanks in advance,
Bourth
--
View this message in context: http://www.nabble.com/Plugin-by-name-%27Dojo%27-was-not-found-in-the-registry-when-there-is-*no*-Dojo-elements-in-view-%21-tp25711666p25711666.html
Sent from the Zend MVC mailing list archive at Nabble.com.
没有评论:
发表评论