VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: Lexiboy on March 19, 2012, 22:47:42 PM

Title: correct JQuery being loaded?
Post by: Lexiboy on March 19, 2012, 22:47:42 PM
Using VM 2.02 on Joomla 1.7.3

While investigating why adding to card gives some problem I decided to check what JQuery is loaded.
When I read the header of my web site I see the following jquery scripts being loaded:

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js" type="text/javascript"></script>
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js" type="text/javascript"></script>
<script src="http://www.lemongrasshouse.ru/components/com_virtuemart/assets/js/jquery.ui.autocomplete.html.js" type="text/javascript"></script>
<script src="http://www.lemongrasshouse.ru/components/com_virtuemart/assets/js/jquery.noConflict.js" type="text/javascript"></script>

Is this correct? I am surprised about the different version numbering between jquery and jquery-ui.  And are they both needed?
Title: Re: correct JQuery being loaded?
Post by: Artanis on March 20, 2012, 00:11:56 AM
Hi!

jQueryUI is additional effect and animation library for jQuery framework. They both are used mostly simultaneously.
The other two scripts that You have posted are additional plugins for jQuery. It seems that Your jQuery main library is bit too old. Update link to embed 1.7.1 version (link to Google code library also below).

And you should avoid including more than one jQuery or jQuerUI instance in Your site - make sure that none of the Joomla/Virtuemart plugins that comes with jQuery embedding feature by default when installed are configured to force include their own versions of jQ.

Latest stable versions (as of March 2012) are:

To investigate possible jQery (JavaScript) problems in Your site, debug Your site by using some kind of Developer console or Error console plugin for Your browser (it's alo built in Firefox browser). You can also post link to site You're developing so others can try to test out problems You mentioned.
Title: Re: correct JQuery being loaded?
Post by: Lexiboy on March 20, 2012, 20:08:51 PM
Quote from: Artanis on March 20, 2012, 00:11:56 AM
Latest stable versions (as of March 2012) are:

  • jQuery 1.7.1  (link for embedding (http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js))
  • jQueryUI 1.8.18   (link for embedding (https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.min.js))

To investigate possible jQery (JavaScript) problems in Your site, debug Your site by using some kind of Developer console or Error console plugin for Your browser (it's alo built in Firefox browser). You can also post link to site You're developing so others can try to test out problems You mentioned.

I manually changed "administrator/components/com_virtuemart/helpers/config.php" to include the latest versions. When you upgrade VM this file with links also updates I guess?