sleimanx2
sleimanx2

Reputation: 2056

Cakephp can't locate core helper: JqueryEngineHelper.php when on server

When I run my app on my locale machine it works fine, but when I run it on my sever using cpanel, everything works fine expect when I use js helper using jquery library the following error occurs

Error: jqueryEngineHelper could not be found.

Error: Create the class jqueryEngineHelper below in file: app/View/Helper/jqueryEngineHelper.php

<?php
class jqueryEngineHelper extends AppHelper {

} 

Nb: all the files exists.

Upvotes: 1

Views: 418

Answers (2)

ADmad
ADmad

Reputation: 8100

It's incorrectly looking for "jqueryEngineHelper" instead of "JqueryEngineHelper" which most likely means you didn't use correct casing when specifying the helper in controller. Make sure you have public $helpers = array('Js' => array('Jquery')); with capital "J" for "Jquery" and not "jquery"

Upvotes: 3

Davor Lozic
Davor Lozic

Reputation: 116

Try with App::uses() to load the helper.

http://book.cakephp.org/2.0/en/core-utility-libraries/app.html#loading-classes

Example from CakePHP documentation:

App::uses('HtmlHelper', 'View/Helper');

You try:

App::uses('jqueryEngineHelper', 'View/Helper');

EDIT:

Try putting that in your AppController.php at your starting lines in your code.

Upvotes: -1

Related Questions