Suitecrm 7.1 Fatal error: Cannot redeclare class

When users log in, the system error appears as follows:
Fatal error: Cannot redeclare class OAuthToken in C:\xampp\htdocs\suitecrm7.1\custom\include\social\twitter\twitter_auth\twitteroauth\OAuth.php on line 27

How to fix it?
Thank all!

I’m getting the same issue on 7.1. Users get this error after logging and need to refresh the page to see their dashboard.

It only happens for normal users, system admins go straight to the dashboard page. I’ve done a repair & rebuild but problem persists.

Any ideas?

Hello,

Possibly remove the Twitter Connectors to restore service to the users while you debug? Are you running 7.1.1? If not, upgrade your instance.

I got Suite v 7.1.1 and got same issue for one specific user, that had displayed that error when logged in.

I solved it by wrapping the “OAuthToken” class definition at \custom\include\social\twitter\twitter_auth\twitteroauth\OAuth.php line 27 with:


if ( !class_exists ( 'OAuthToken' ) ) {

[class definition goes here...]

}

somehow Suite is including this file more than once and then the error happens.

Regards

Hi there,

This bug will be addressed in the next bug-fix release.

Thanks,

Will.