Javascript fails after login, until refresh - then it loads

Hello again,

I am thoroughly impressed with the progress I’ve made with SuiteCRM’s implementation within my company, but there is one bug in particular that is totally confusing me.

The problem is this: After logging in, and redirecting to the dashboard, the page is entirely white. Refreshing the page will properly load everything. Here’s what I’ve found:

  1. This does not apply to “System Administrator” users. However, a regular user with all roles still has this problem.
  2. This applies to both LDAP and standard users.
  3. Firebug for Firefox reports a “500 Internal Server Error” after login, but otherwise displays nothing else. After a refresh, that message is gone.
  4. Inspection of the source using Chrome’s “Inspect” feature shows that a lot of Javascript does not appear to load after login. After a refresh, much more code loads.
  5. Disabling “Activity Streams” globally will completely fix the issue.
  6. Inspection of “SugarCRM.log” seems to show that SecuritySuite is not firing properly at the first login. I see absolutely no references to this plugin until after I refresh the page.
  7. Changing the default module after login does not have any problems. Security is properly applied.
  8. My web server (IIS) is not reporting any strange issues. If I turn on PHP debugging, nothing is displayed on this white page.

Any ideas about what else I can try? The dashboard is one of the most important features of SuiteCRM, I’d hate to not be able to load it automatically for users upon login. I have attached a copy of my SugarCRM.log file, Debug-level, including the first login and one refresh.

Thanks for any help.

Same issue here. Not sure what to look for. Disabling the Activity Stream is not really a workaround, since it is a useful functionality…

Seems to be related to the twitter connector, even having it disabled. With display errors to “on” I get the message

Fatal error: Cannot redeclare class OAuthToken in custom\include\social\twitter\twitter_auth\twitteroauth\OAuth.php on line 27

I do not need this connector, so I tried renaming that function to OAuthtoken2 and it seemed to do the trick.
So, in line 27 change

class OAuthToken {

to

class OAuthToken2 {

Obviously, this is not a solution, but a workaround. Someone more knowledgeable should find the true fix…

1 Like

Thank you! That worked for me.

Given that it’s in the custom folder, too, hopefully this will persist through upgrades.

Well, although it is in the custom folder, I believe it is there because it is an addition to the default sugarcrm, but it is a core to the suitecrm package, so I guess it will not persist through updates.

Anyway, I do not know it it is related but I was experiencing very slow login times. This perfomance problem was only perceived at login and not through the normal operation of the application. Our server does not have direct access to the internet. Increasing the logs up to debug level, we were able to identify an aprox 1 minute gap just after SELECT * FROM config where name = ‘module_twitter’ and value = 1;

We guessed there might be some code that tried to access the internet, so we went to the table “config” and we set the value of the “module_twitter” entry to 0. That worked like a charm and the login performance issues were gone. Since we do not use that connector, hopefully it will not have any side-effects…

Confirmed.

AS in http://www.suitecrm.com/index.php?option=com_kunena&view=topic&catid=10&id=1459&Itemid=508#6080