0
votes

I'm playing (trying to at least) with ZendX (Jquery). I tried to load it up in the current project I'm working on and have been given a uncought exception. I've tried various combinations and failed dramatically. Interestingly, I've created a new project and followed the same logic (literally ctrl+c & ctrl+v) and it worked. Back to the old project - exception thrown. What am I doing wrong?

exception

Fatal error: Uncaught exception 'Zend_Loader_PluginLoader_Exception' with message 'Plugin by name 'JQuery' was not found in the registry; used paths: Zend_View_Helper_: Zend/View/Helper/;./views\helpers/' in C:\xampp\htdocs\shop\vendor\Zend\Loader\P....C:\xampp\htdocs\shop\vendor\Zend\Layout.php(796) in C:\xampp\htdocs\shop\vendor\Zend\Controller\Plugin\Broker.php on line 336

application.ini

  [production]
phpSettings.display_startup_errors = 0
phpSettings.display_errors = 0
includePaths.library = APPLICATION_PATH "/../library"
bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
bootstrap.class = "Bootstrap"
appnamespace = "Application"
resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers"
resources.frontController.params.displayExceptions = 0


resources.view.helperPath.Zend_View_Helper = APPLICATION_PATH "/views/helpers"

resources.view.doctype = "HTML5"

resources.Modified.css ="/shop/public/css/style.css"

autoloaderNamespaces[]="My_"


resources.db.adapter = "pdo_mysql"
resources.db.params.dbname = "****"
resources.db.params.host = "localhost"
resources.db.params.username = "****"
resources.db.params.password= "****"
resources.db.charset = "utf8"



resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts/"

resources.view.helperPath.ZendX_JQuery_View_Helper = APPLICATION_PATH "/../library/ZendX/JQuery/View/Helper"
pluginPaths.ZendX_Application_Resource = APPLICATION_PATH "/../library/ZendX/Application/Resource"

layout.php

<head>        
    <?php  echo $this->jQuery(); ?>
</head>

The cpde

1
also, I added code autoloaderNamespaces[]="ZendX" code It, didn't work...JakubBab

1 Answers

0
votes

I've changed bootstrap and it worked. For some reason application.ini refused to cooperate..

   protected function _initBootstrap(){

    $this->bootstrap('layout');
    $layout = $this->getResource('layout');
    $view = $layout->getView();
    $view->addHelperPath('ZendX/JQuery/View/Helper/', 'ZendX_JQuery_View_Helper');
}