ZendFramework 1.11.3: 'Plugin by name 'Jquery' was not found in the registry

5.7k views Asked by At

I have two servers.

  1. snow leopard on HFS (case-insensitive) file system
  2. gentoo linux with ext4 (case-sensitive) file system

on both of them I use php 5.3 and latest apache2 and latest Zend Framework 1.11 build.

under Mac OSX the website works properly, under linux I have the following error:

Fatal error: Uncaught exception 'Zend_Loader_PluginLoader_Exception' with message 'Plugin by name 'Jquery' was not found in the registry; used paths: Dashboard_View_Helper_: /home/ufk/Projects/php-projects/xpo-website/application/modules/dashboard/views/helpers/ xpo_Uploadify_View_Helper_: xpo/Uploadify/View/Helper/ ZendX_JQuery_View_Helper_: ZendX/JQuery/View/Helper/ : /home/ufk/Projects/php-projects/xpo-website/application/helpers/ Zend_View_Helper_: Zend/View/Helper/' in /usr/local/ZendFramework-1.11.3/library/Zend/Loader/PluginLoader.php:412 Stack trace: 
0 /usr/local/ZendFramework-1.11.3/library/Zend/View/Abstract.php(1174): Zend_Loader_PluginLoader->load('Jquery') 
1 /usr/local/ZendFramework-1.11.3/library/Zend/View/Abstract.php(610): Zend_View_Abstract->_getPlugin('helper', 'jquery') 
2 /usr/local/ZendFramework-1.11.3/library/Zend/View/Abstract.php(336): Zend_View_Abstract->getHelper('jquery') 
3 /home/ufk/Projects/php-projects/xpo-website/application/modules/dashboard/views/scripts/game/login.phtml(1): Zend_View_A in /usr/local/ZendFramework-1.11.3/library/Zend/Loader/PluginLoader.php on line 412

I copied the ZendX directory (from extras/library) to the library directory of the Zend Framework located at /usr/local/ZendFramework/library/ZendX/.

I initialize the helper using:

       ZendX_JQuery::enableView($view);

the code inside login.phtml that is causing the exception is:

$this->jquery()->enable();

it shouldn't even relate to the code itself because under the Mac OS server it does work, but i do have ZendX here too so i can't pinpoint the problem.

2

There are 2 answers

0
Will Prescott On BEST ANSWER

Not able to test right now, but suspect you need to uppercase the 'q' in jQuery in this line:

$this->jQuery()->enable();

Typically ZF maps methods to class names by uppercasing the first letter, so could be the 'unusual' uppercase Q in the class name is the problem.

0
Tomáš Fejfar On

You have to add the helper path. See manual. You can do that in bootstrap, using Zend_Application, using FrontController plugin, in base controller class or directly in view.

Update: Sorry I misread your question. The problem IS the small "q". Windows is case insensitive. That's why it works there. Linux is not. So 'jQuery.php' and 'jquery.php' are not the same files.