Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi all!
The title of issue says all about the problem. I find in my error_log these error messages:
PHP Fatal error: Class 'Hybrid_Exception' not found in .../sites/all/libraries/hybridauth/hybridauth/Hybrid/Endpoint.php
I'm using 2.4.0 version of hybridauth library
Otherwise the module works correctly, the google and facebook login too, there are no visible problems.
Comment | File | Size | Author |
---|---|---|---|
#8 | hybridauth-autoload-2554131-8.patch | 1.96 KB | klausi |
Comments
Comment #2
robit8deb CreditAttribution: robit8deb commentedsame here - mod works - error log filling up with this.
Comment #3
kevin_91 CreditAttribution: kevin_91 commentedI have the same error. Can't log-in with LinkedIn.
Comment #4
Sylense CreditAttribution: Sylense commentedSame error. I've had some users notify me of this error while others can login with no problems. Each time they have stated they can login fine on desktop but receive this error on iPhone. Not sure what the difference would be but that is as much information as I have. I, myself, have not been able to replicate this on my end yet.
Not sure if LinkedIn updated their API (yet again). This problem didn't seem to arise until just recently.
Comment #5
JonathanHindi CreditAttribution: JonathanHindi commentedI am facing the same thing were the same error get logged in the error log, I can login using facebook and google normally, however some users reported that they can't login.
Comment #6
afarrell CreditAttribution: afarrell commentedI was running into this error message too. The author of the hybridauth library expects you to use composer to install it, which would create an autoloader that would load the Hybrid_Exception when it's called. (This should result in your seeing a more meaningful exception in your logs.) I missed this when I installed HybridAuth at first. What you can do is:
1) Install composer according to the appropriate instructions at https://getcomposer.org/doc/00-intro.md
That's just going to put a composer.phar file wherever you run the installation.
2) Within the hybridauth directory, run "php ~/composer.phar install". (Replacing ~/ with an appropriate path if you installed composer.phar somewhere other than your home directory.)
That will add an "autoload.php" and some other files to the hybridauth/vendor directory.
Now, you need to make sure that autoload.php file is loaded when the HybridAuth module needs it. I'm using the Drupal 6 HybridAuth module, and I hope this is already handled in the D7 version. I wound up adding a require_once statement in hybridauth.pages.inc, in the hybridauth_endpoint function, but I'm not entirely sure that's the best way to go -- and the Drupal 7 version seems to be greatly reorganized.
Comment #7
duozerskComment #8
klausiMy hacky solution: running "composer install" in the hybridauth library folder and then using the generated autoloader.
Comment #9
BenStallings CreditAttribution: BenStallings commentedAs long as we're contributing patches, here is an alternate approach that patches the library instead of the module. I realize that this is the issue queue for the module and not for the library, but this way takes only one line of code instead of many.
Comment #10
klausiYou forgot to load Hybrid_Logger and Hybrid_Error and possibly others.
That's the problem with manual includes: since Hybridauth is moving to composer autoloading there is potential for plenty more errors in the future.
Comment #11
giorgio79 CreditAttribution: giorgio79 commentedCould integration with the https://www.drupal.org/project/composer_manager help?
Comment #12
giorgio79 CreditAttribution: giorgio79 commentedThe patch applies, but probably the module needs the compose manager integration to automate the vendor autoloading.
Comment #13
duozerskComment #15
duozerskCommitted #8.
Thank you very much.
AndyB
Comment #17
sagar.choudhary CreditAttribution: sagar.choudhary commentedI am facing weird problem, i am getting the same error in chrome browser but no error in firefox. I am using 7.x-2.13 version.
Comment #18
bob.hinrichs CreditAttribution: bob.hinrichs commentedRunning 7.x-2.15, we are getting a handful of these errors as well, tied to line 205 of sites/all/libraries/hybridauth/hybridauth/Hybrid/Endpoint.php on line 205. We have quite a few people using the site using this module, so it is intermittent, and we can't replicate it to see what is happening. The initialization sequence is difficult to follow through the library to see what scenario might cause it.
We have a situation that is happening, with similar frequency, where users that create accounts via social login with hybridauth receive duplicate accounts in drupal. I don't know if it's related but logically it could be. The users are all Google+ users, who are connecting an account where their email address with google is not a gmail.com address, but are instead part of accounts set up as google educator accounts (e.g. 'xx@sfschools.k12.ca.us'). This makes it really hard for us to try to replicate, as we do not have google for education accounts to try. I'm wondering if there are some restrictions on some types of google accounts, or maybe differences in how they log into the google accounts, that cause this.
Some late-breaking news: I just got a comment from a colleague that the above duplicate user problem appears to happen when people click the button on the registration form multiple times (they are waiting for the social provider to respond).
Thought I'd add this here to see if anyone is still seeing some of these errors and whether your scenario for the occurrence of these errors has any similarity to ours.
Comment #19
ogggg CreditAttribution: ogggg commentedI have this issue on 7.x-2.15 version
Comment #20
dpliscoff CreditAttribution: dpliscoff commentedThe message was appearing when logging out with a standard Drupal account, using version 2.15 on Drupal 7.53. Installing the hybridauth library using composer as recommended in #6 (without applying the patch in #8) fixed it.