0

I'm having a problem with Community Builder Joomla component javascript. It looks like is killing the rest of the jquery code.

here is the page that gives the problem. http://www.sism.org/index.php?option=com_comprofiler&task=usersList&Itemid=123&limitstart=0&search=&cbsecuritym3=cbm_5cf530b0_176beecb_853198a20ad0ca7580ee8323bfd042b0&listid=9

If you compare it with the home page, you'll see that there should be some jquery powered animated menus that are missing in this page.

any suggestion?

I use CB 1.7.1 on jommla 1.5.22

PS: I wrote in the Community Builder forum with no answers yet...

Bakaburg
  • 3,165
  • 4
  • 32
  • 64

2 Answers2

2

I had the same problem and resolved by loading jQuery from Jomla and commented those lines in: administrator/components/com_comprofiler/plugin.foundation.php so CB doesnt load his own jQuery

//  if ( ! defined( 'J_JQUERY_LOADED' ) ) {
//      $this->document->addHeadScriptUrl( '/components/com_comprofiler/js/jquery-' . _CB_JQUERY_VERSION . '/jquery-' . _CB_JQUERY_VERSION . '.js', true, null, 'jQuery.noConflict();' );
//      define( 'J_JQUERY_LOADED', 1 );
//  }
bensiu
  • 24,660
  • 56
  • 77
  • 117
andre
  • 21
  • 2
1

The problem is that you have jquery loading twice in the page. When jquery loads the second time, it loses the ability to interact with any jquery libraries that were loaded before this second call (which basically means all the ones that you needed for your piece).

The easiest way to solve this in your case (as long as you know that you will be loading jquery yourself on all pages) is to hack Community Builder and remove it's loading of jquery.

I would do a text search on com_comprofiler for "jquery-1.5.2" to find where it is inserted into the page, comment out this line, and see if that fixes your issue.

David Fritsch
  • 3,711
  • 2
  • 16
  • 25
  • I really don't like hacking plugin or template code due to the well known update problems. Hwr, for some reasons, since I installed jotcache, a cache component, i'm not having the problem anymore... mysteries of joomla... PS: plugin developers should really learn something about conditional js loading. – Bakaburg Jun 08 '12 at 14:21
  • 1
    I totally agree. Not a big fan of hacking, but I've yet to think of a better way to stop the components form loading jquery. I am a big fan of conditional js and do use it in all of my joomla components! – David Fritsch Jun 21 '12 at 23:40