Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Helper/Plugin isn't loaded #158

Open
sela opened this issue May 21, 2014 · 4 comments
Open

Helper/Plugin isn't loaded #158

sela opened this issue May 21, 2014 · 4 comments

Comments

@sela
Copy link

sela commented May 21, 2014

I copied the plugin to the folder /var/www/tree/Plugin/Facebook

From bootstrap.php I loaded it
CakePlugin::load('Facebook');

I checked in the DebugKit toolbar and I can't find the Plugin is loaded under Variables and then Plugin

but get the following error:
Helper class FacebookHelper could not be found.

Error: An Internal Error Has Occurred.
Stack Trace

CORE/Cake/View/View.php line 867 → HelperCollection->load(string, array)
CORE/Cake/View/View.php line 341 → View->loadHelpers()
CORE/Cake/Controller/Controller.php line 1240 → View->__construct(PagesController)
CORE/Cake/Controller/Controller.php line 938 → Controller->_getViewObject()
CORE/Cake/Routing/Dispatcher.php line 192 → Controller->render()
CORE/Cake/Routing/Dispatcher.php line 160 → Dispatcher->_invoke(PagesController, CakeRequest, CakeResponse)
APP/webroot/index.php line 116 → Dispatcher->dispatch(CakeRequest, CakeResponse)
@webtechnick
Copy link
Owner

Please make sure you're using the correct branch of the plugin. There are two versions of it. The one for CakePHP 1.3.x and CakePHP 2.x. Please be sure you're using the CakePHP 2.x version of the plugin. 

Nick

On Wed, May 21, 2014 at 4:19 AM, sela [email protected] wrote:

I copied the plugin to the folder /var/www/tree/Plugin/Facebook
From bootstrap.php I loaded it
CakePlugin::load('Facebook');
I checked in the DebugKit toolbar and I can't find the Plugin is loaded under Variables and then Plugin
but get the following error:
Helper class FacebookHelper could not be found.
Error: An Internal Error Has Occurred.
Stack Trace
CORE/Cake/View/View.php line 867 → HelperCollection->load(string, array)
CORE/Cake/View/View.php line 341 → View->loadHelpers()
CORE/Cake/Controller/Controller.php line 1240 → View->__construct(PagesController)
CORE/Cake/Controller/Controller.php line 938 → Controller->_getViewObject()
CORE/Cake/Routing/Dispatcher.php line 192 → Controller->render()
CORE/Cake/Routing/Dispatcher.php line 160 → Dispatcher->_invoke(PagesController, CakeRequest, CakeResponse)

APP/webroot/index.php line 116 → Dispatcher->dispatch(CakeRequest, CakeResponse)

Reply to this email directly or view it on GitHub:
#158

@sela
Copy link
Author

sela commented May 21, 2014

I wasn't sure if I get the master or cakephp 1.3 branch so downloaded the 3.1.2 now it just tells me

Helper class FacebookHelper could not be found.
Error: An Internal Error Has Occurred.

and doesn't suggest to create the folder location where to create the helper.


From: Nick Baker [email protected]
To: webtechnick/CakePHP-Facebook-Plugin [email protected]
Cc: sela [email protected]
Sent: Wednesday, 21 May 2014, 16:21
Subject: Re: [CakePHP-Facebook-Plugin] Helper/Plugin isn't loaded (#158)

Please make sure you're using the correct branch of the plugin. There are two versions of it. The one for CakePHP 1.3.x and CakePHP 2.x. Please be sure you're using the CakePHP 2.x version of the plugin. 

Nick

On Wed, May 21, 2014 at 4:19 AM, sela [email protected] wrote:

I copied the plugin to the folder /var/www/tree/Plugin/Facebook
From bootstrap.php I loaded it
CakePlugin::load('Facebook');
I checked in the DebugKit toolbar and I can't find the Plugin is loaded under Variables and then Plugin
but get the following error:
Helper class FacebookHelper could not be found.
Error: An Internal Error Has Occurred.
Stack Trace
CORE/Cake/View/View.php line 867 → HelperCollection->load(string, array)
CORE/Cake/View/View.php line 341 → View->loadHelpers()
CORE/Cake/Controller/Controller.php line 1240 → View->__construct(PagesController)
CORE/Cake/Controller/Controller.php line 938 → Controller->_getViewObject()
CORE/Cake/Routing/Dispatcher.php line 192 → Controller->render()
CORE/Cake/Routing/Dispatcher.php line 160 → Dispatcher->_invoke(PagesController, CakeRequest, CakeResponse)

APP/webroot/index.php line 116 → Dispatcher->dispatch(CakeRequest, CakeResponse)

Reply to this email directly or view it on GitHub:
#158

Reply to this email directly or view it on GitHub.

@shamandude
Copy link

i dont know if this would help .but i had the same problem
this is how i fixed it
include the plugin in the cakephp default controller "pagesController.php"
public $helpers = array('Facebook.Facebook');

@PhantomWatson
Copy link

For whatever reason, I got the following error when the plugin and helper were correctly loaded and after my users table was deleted from the database:

Fatal error: Uncaught exception 'FatalErrorException' with message '[MissingHelperException] Helper class FacebookHelper could not be found.
#0 C:\xampp\htdocs\app_name\lib\Cake\View\HelperCollection.php(63): HelperCollection->load('Facebook') 
#1 C:\xampp\htdocs\app_name\lib\Cake\View\View.php(848): HelperCollection->__isset('Facebook') 
#2 C:\xampp\htdocs\app_name\app\View\Layouts\error.ctp(60): View->__get('Facebook') 
#3 C:\xampp\htdocs\app_name\lib\Cake\View\View.php(961): include('C:\\xampp\\htdocs...') 
#4 C:\xampp\htdocs\app_name\lib\Cake\View\View.php(923): View->_evaluate('C:\\xampp\\htdocs...', Array) 
#5 C:\xampp\htdocs\app_name\lib\Cake\View\View.php(546): View->_render('C:\\xampp\\htdocs...') 
#6 C:\xampp\htdocs\app_name\lib\Cake\View\View.php(481): View->renderLayout('', 'error') 
#7 C:\xampp\htdocs\app_name\lib\Cake\Error\ExceptionRenderer.php(325): View->render('error500', 'error') 
#8 C:\xampp\htdocs\app_name\lib\Cake\Error\ExceptionRenderer.php(306): ExceptionRendere in C:\xampp\htdocs\app_name\lib\Cake\Error\ErrorHandler.php on line 138

But when the users table was re-added, the error went away.

So anyone else experiencing this when the helper should be getting loaded correctly, check on your database.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants