Alejandro Posted February 1, 2010 at 03:41 PM Share Posted February 1, 2010 at 03:41 PM 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
Bigalmercy Posted August 30, 2010 at 05:23 PM Share Posted August 30, 2010 at 05:23 PM This section is only visible with a valid subscription. If you have a valid subscription, please login. Link to comment
Alejandro Posted August 31, 2010 at 01:22 PM Author Share Posted August 31, 2010 at 01:22 PM This section is only visible with a valid subscription. If you have a valid subscription, please login. Link to comment
Bigalmercy Posted August 31, 2010 at 01:54 PM Share Posted August 31, 2010 at 01:54 PM This section is only visible with a valid subscription. If you have a valid subscription, please login. Link to comment
Shaun LeMercier Posted September 11, 2010 at 09:41 PM Share Posted September 11, 2010 at 09:41 PM This section is only visible with a valid subscription. If you have a valid subscription, please login. Link to comment
Raffi S. Posted September 19, 2010 at 07:21 PM Share Posted September 19, 2010 at 07:21 PM This section is only visible with a valid subscription. If you have a valid subscription, please login. Link to comment
Alejandro Posted September 20, 2010 at 04:49 PM Author Share Posted September 20, 2010 at 04:49 PM This section is only visible with a valid subscription. If you have a valid subscription, please login. Link to comment
Alejandro Posted November 22, 2010 at 03:31 PM Author Share Posted November 22, 2010 at 03:31 PM This section is only visible with a valid subscription. If you have a valid subscription, please login. Link to comment
auto Posted November 6, 2011 at 07:30 PM Share Posted November 6, 2011 at 07:30 PM This section is only visible with a valid subscription. If you have a valid subscription, please login. Link to comment
Alejandro Posted November 6, 2011 at 10:00 PM Author Share Posted November 6, 2011 at 10:00 PM This section is only visible with a valid subscription. If you have a valid subscription, please login. Link to comment
Recommended Posts