Jump to content

JomSocial's HelloMe module


Alejandro

Recommended Posts

The problem

 

When displaying this module in JReviews pages a javascript error occurs because jQuery is not loaded by JomSocial even though it's required.

 

The reason for this problem is that JReviews has a check to prevent jQuery from loading twice when JomSocial is installed and it defines the jQuery constant that JomSocial uses to check if jQuery has already loaded. When jQuery is loaded by JReviews via the JReviews Comments plugin it defines this jQuery constant, but Joomla loads jQuery too late to be useful to the JomSocial module:

 

The solution

 

Force jQuery to load in the module by adding the last two lines shown in the code below in the /modules/mod_hellome/mod_hellpme.php file

 

    CWindow::load();
    $document =& JFactory::getDocument();
    $js  = JURI::root().'components/com_community/assets/jquery-1.3.2.pack.js';
    $document->addScript($js);

 

Update to the original solution

 

Since the original patch was posted, JomSocial rewrote jQuery into their own version now loaded as joms.jquery.js and it seems like the patch no longer works. Alternatively users can edit the /jreviews/views/helpers/assets.php file and remove the JomSocial jquery check by commenting this line as shown adding the double slashes.

 

//                        define( 'C_ASSET_JQUERY', 1 );

Link to comment
  • 6 months later...
  • 2 weeks later...
  • 2 months later...
  • 11 months later...
×
×
  • Create New...