Pages

Wednesday, May 4, 2016

SugarCRM Troubleshooting: Still Loading...

Some months back I posted an article that spoke to a problem that caused Sugar to get stuck at a "Loading..." message. As discussed in that post, the culprit usually revolves around the rewrite module or its configuration.

In recent months, however, some Sugar customers reported puzzling situations where the Loading... problem could not be resolved through corrections to the rewrite configuration. Adding to the bewilderment was the point that the configuration of these environments seemed to be in order. For example, PHP versions and configuration seemed to line up with recommendations provided by SugarCRM. 

Eventually, after much effort from several folks at SugarCRM, the source of the problem was finally revealed. It turns out that late last year, the JSMin PHP extension was modified and updated to version 2.0.1. The changes in this new version of JSMin introduced an incompatibility for Sugar, which in turn causes the Loading... problem. Note this is usually accompanied by errors in the JavaScript console.

If you are encountering the Loading... issue and have already completed the steps to verify and/or correct the potential rewrite issues, double check your version of the JSMin extension. You can check the version by taking a look at the JSMin section of the output from phpinfo().

Should you have version 2.x of JSMin installed, you can correct the problem by:


  • Downgrading your version of JSMin to 1.1. Please note that if you are installing via PECL, you will need to specify the version you wish to install or it will install the latest version (2.x). To ensure it installs version 1.1, use the following command: pecl install jsmin-1.1.0
  • Disable the JSMin extension. Sugar does not require this extension for proper operation. The JSMin extension is used in a limited capacity as it helps expedite the process that minifies JavaScript code used throughout Sugar. Its absence will not cause that process to fail, only reduce the speed at which it completes, thus, it is perfectly safe to disable it.
Hope this helps.

6 comments:

  1. Thanks for the tip. I was facing the same exact issue you have described.

    ReplyDelete
  2. How would I disable the JSMin extension in Sugar?

    ReplyDelete
    Replies
    1. You would do it within your PHP configuration. Usually the php.ini file would have a line similar to the following:

      extension=jsmin.so

      removing that line or commenting it out would disable JSMin. Don't forget to restart your web service after making changes to the PHP configuration in order to apply your changes.

      Delete
    2. Thanks for the quick reply. I am trying to get SugarCRM CE 6.5 installed on Ubuntu 16.04 with PHP7.0. I am able to get the sugar install wizard to complete successfully however after I successfully complete the wizard i get dropped to the site and have the white screen of death. I believe my issue is related to jquery not being loaded. I fear the lack of jsmin is preventing the minification of the js scripts and thus none get loaded. Any words of wisdom?

      The error in chrome console is "login.js?v=P7SNRCeju5gnWXpAZTtJ9g:47 Uncaught ReferenceError: $ is not defined"

      Delete
    3. It is unlikely that it is JSMin related and more likely your version of PHP.

      At this time, PHP 7 is not supported by any version of Sugar. The problem you are experiencing is probably the first of many that you are likely to experience on that version of PHP.

      You need to install onto a server with a supported version of PHP or you will constantly be battling gremlins.

      Supported platforms are detailed here:

      http://support.sugarcrm.com/Resources/Supported_Platforms/Sugar_6.5.x_Supported_Platforms/

      Delete
    4. Great advice Angel. I removed all versions of PHP and installed only php5.6 and its working like a charm. Thank you for your help! Also I just wanted to mention your sugarcrm blog posts on apache modrewrite and jsmin are awesome and great knowledge to have before doing the install. Thanks again!!!

      Delete

Your comments, feedback and suggestions are welcome, but please refrain from using offensive language and/or berating others. Thank you in advance.