×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: mootools conflict using JB library

mootools conflict using JB library 12 years 1 month ago #15723

  • blain Arnaud
  • blain Arnaud's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 27
  • Thank you received: 0
Hello Daniel,

I'm using JB library to speed up my joomla website. It's a great plugin that allow to avoid conflict with mootools and Jquery and allow to replace local libraries to google one.

So the problem is that when I enable Jquery from JB library i've got errors : Class.Mutators is undefined on Line 199 com_hotspots/js/more/mootools-1.2.5.1-more.js and then Array.implement is not a function Line 84 in com_hotspots/js/moo/map.extras.js


It's strange because your extension is a mootools one, i don't use JB library mootools replacement, only mootools upgrade and my others mootools extensions works fine.


Here are the scripts when I don't use Jquery replacement :

<script type="text/javascript" src="/media/plg_jblibrary/jquery/jquery.lazyload.js"></script>
<script type="text/javascript" src="/plugins/system/mtupgrade/mootools.js"></script>
<script type="text/javascript" src="/plugins/system/jat3/base-themes/default/js/core.js"></script>
<script type="text/javascript" src="/plugins/system/jat3/base-themes/default/js/menu/mega.js"></script>
<script type="text/javascript" src=" maps.google.com/maps/api/js?sensor=true "></script>
<script type="text/javascript" src=" www.lebellegardien.com/media/com_hotspot...ools-1.2.5.1-more.js "></script>


And here is when I use Jquery replacement and it crash your extension :

<script type="text/javascript" src="/media/system/js/mootools.js"></script>
<script type="text/javascript" src=" ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js "></script>
<script type="text/javascript" src="/media/plg_jblibrary/jquery/jquery.noconflict.js"></script>
<script type="text/javascript" src="/media/plg_jblibrary/jquery/jquery.lazyload.js"></script>
<script type="text/javascript" src="/plugins/system/jat3/base-themes/default/js/core.js"></script>
<script type="text/javascript" src="/plugins/system/jat3/base-themes/default/js/menu/mega.js"></script>
<script type="text/javascript" src=" maps.google.com/maps/api/js?sensor=true "></script>
<script type="text/javascript" src=" www.lebellegardien.com/media/com_hotspot...ools-1.2.5.1-more.js "></script>

I'm using joomla 1.5.25 and the web site is www.lebellegardien.com

thanks

Re: mootools conflict using JB library 12 years 1 month ago #15725

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Can you give me a direct link to hotspots?
Daniel

Re: mootools conflict using JB library 12 years 1 month ago #15728

  • blain Arnaud
  • blain Arnaud's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 27
  • Thank you received: 0
really fast !!

it's www.lebellegardien.com/annuaire

Sorry but I've found to load Jquery from JB library ordering mootools upgrade first and then JB library.

But now i would like to replace by google mootools from JB library.

So I tried :
ajax.googleapis.com/ajax/libs/mootools/1.4.5/mootools.js
ajax.googleapis.com/ajax/libs/mootools/1...ls-yui-compressed.js
ajax.googleapis.com/ajax/libs/mootools/1.2.4/mootools.js

but hotspot doesn't work with no error messages this time. And even if system mootools upgrade is enabled or not.

But on my index page it works with mootools extensions (JA mega menu and METEO)

thanks

Re: mootools conflict using JB library 12 years 1 month ago #15738

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Ok, so I installed the JB library on my local machine to test it out. I think that there is something wrong in the plugin itself.
When I just decide to replace the mootools library -> then the google url gets added to the head, but after that the local mootools path is also added.

When I select the option -> remove mootools-> the google path is removed, but the local path to mootools is still there.

So in my case I saw

path/to/mootools/more.js
... jquery

path/to/mootoosls-core.js


This is wrong. Actually the plugin should remove the path/to/mootools-core.js

and as the first library to be loaded we should have ajax....goolge.....moootools...

Can you report this issue to JB?

Kind regards,
Daniel

Re: mootools conflict using JB library 12 years 1 month ago #15739

  • blain Arnaud
  • blain Arnaud's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 27
  • Thank you received: 0
Hello Daniel,

that's what I thought too. The problem is that we can't login freely on their forum.

Therefore, is there a way to use google api on your extension, where do I have to change that code ?

thanks

Re: mootools conflict using JB library 12 years 1 month ago #15740

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
As long as you use mootools you can use it - no matter if you load it from google or from the moon :)

the thing is - mootools is a standard library that comes with joomla. JQuery is a very bad choice that most developers accepted because they were lazy and didn't want to write the same code one time for 1.1 and 1.2 - a perfectly understandable situation, but with joomla 1.6,1.7,2.5 - this is not anymore the case. Joomla always comes with the latest mootools version and that version is most of the time compatible with the previous ones...

So, what I want to say is that if you load moootools first in your head you will have to make sure that joomla doesn't load it again somewhere later in the head. And you can't do this without a plugin.

Daniel

P.S. I'm trying to contact the JB guys, maybe I'll have some success :)

Re: mootools conflict using JB library 12 years 1 month ago #15741

  • blain Arnaud
  • blain Arnaud's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 27
  • Thank you received: 0
Hello, thank you Daniel for your explanations.

For google mootols it's just because I read that it's faster than having it on local.

In my case i prefered to use jquery due to the fact I had so much conflicts and a slow website !!! But now i will try to use only mootools extensions ;)

So normally if I have several versions of mootools, I just have to put the lastest version on head and I can delete mootools code that are in the other extensions ? It's not so easy because sometimes we use extensions in differents pages and i it's deleted they will not work.

And thanks again to contact JB guys ;) You're the best ;)
Have a good week-end !

Re: mootools conflict using JB library 11 years 11 months ago #16268

  • blain Arnaud
  • blain Arnaud's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 27
  • Thank you received: 0
Hello Daniel,

Did you get somes news about JB Library ?

I need to use it due to a problem with Flexicontent minigallery but if i use it the only one component that doesn't work is your component.

Or what can i do into your component for not having mootools and jquery conflict ?

thanks
  • Page:
  • 1
Time to create page: 0.145 seconds