1

I have uploaded the website on pantheon. Users aren't able to login by using twitter provider on my website. I'm using the HybridAuth module. When I try to login, it shows this error

Fatal error: Cannot redeclare class OAuthException in /srv/bindings/6349f4db8cd54067ae94453f36acb8ec/code/sites/all/libraries/hybridauth/hybridauth/Hybrid/thirdparty/OAuth/OAuth.php on line 11

How do I fix this issue? I have a Facebook login as well and it works. And both the logins work on local host.

  • What is in all your error logs? Server's one? Drupal's watchdog? Browser's console? – Mołot Oct 21 '14 at 7:40
  • Either that's a bug in hybrid auth, or a problem in your configuration, (such as libraries being included twice). In either case, it's not really on-topic here. – Letharion Oct 21 '14 at 10:14
  • @Letharion actually problem with configuration may be on topic - if only OP will provide needed data to really answer it. Like error messages and his configuration (except sensitive data of course). – Mołot Oct 21 '14 at 10:43
  • @Mołot We do have the error message though, don't we? A class is declared twice, and my first guess would be that the files are installed twice, and libraries, or some other method, includes them twice. – Letharion Oct 21 '14 at 11:07
  • @Letharion i think I commented on cached, pre-edit version, sorry. Yes, it looks like bug in HybridAuth module now. – Mołot Oct 21 '14 at 11:09
2

You should update the HybridAuth library to the latest version

  • I have the latest version (2.2) – newbie Oct 21 '14 at 16:31
1

This is how I solved it, I removed the OAuthException class from the OAuth.php file which can be found in sites/all/libraries/hybridauth/hybridauth/Hybrid/thirdparty/OAuth/OAuth.php and twitter login started working.

1

I just ran into this issue. In your Twitter App settings, make sure you specify the Callback URL. Should be http://YOUR_URL/hybridauth/endpoint

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.