VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: balai on May 12, 2022, 15:47:05 PM

Title: VM4/J4 incompatible jQuery-UI and jQuery versions
Post by: balai on May 12, 2022, 15:47:05 PM
Seems like the jQuery-ui v. 1.9.2 and jQuery 3.6.0 (used in J4) are not compatible between them.

Some of the javascript related functionalities i use in my plugins (e.g. sortable (https://jqueryui.com/sortable/)) are no longer working due to javascript errors from the: components/com_virtuemart/assets/js/jquery-ui.min.js

The errors are of the type:
Uncaught TypeError: e x is not a function
e.g.
Uncaught TypeError: e(...).find(...).andSelf is not a function    jquery-ui.min.js:6:66520
For example andSelf (https://api.jquery.com/andself/) is deprecated since jQuery 1.8 and is removed in jQuery 3. Besides that it is still used in the loaded jQuery-ui file.

Do note that jQuery-ui v. 1.9.2 was released back in 2012, while the newest 1.13.x is compatible with the used jQuery 3.6

Any update about your intentions on that is more than welcome as i have to decide if i will replace jQuery UI function calls with others in my code.

Title: Re: VM4/J4 incompatible jQuery-UI and jQuery versions
Post by: Milbo on June 01, 2022, 16:49:24 PM
What happens, when we use now 1.13?

What we just need is a working combo for j3 and j4. Do you have a suggestion?
Title: Re: VM4/J4 incompatible jQuery-UI and jQuery versions
Post by: balai on June 01, 2022, 19:49:34 PM
You can try jQuery 3 and jQuery ui 1.13.x in both J versions.
By doing that you will have similar UIs and dependencies in both versions and they will be tested much easier.

I did not tested that though for any bug.

In any case only compatible libraries should be used.
Title: Re: VM4/J4 incompatible jQuery-UI and jQuery versions
Post by: joomlabuff on September 18, 2022, 10:18:46 AM
Facing the same problem. did you find any fix for this?
Title: Re: VM4/J4 incompatible jQuery-UI and jQuery versions
Post by: niosme on September 19, 2022, 10:02:50 AM
Just look this topic:

https://forum.virtuemart.net/index.php?topic=148808.0
Title: Re: VM4/J4 incompatible jQuery-UI and jQuery versions
Post by: balai on September 19, 2022, 12:17:26 PM
Thanks but this is a temporary solution. It will be purged in the next update.

Should be fixed in the project level.
Title: Re: VM4/J4 incompatible jQuery-UI and jQuery versions
Post by: niosme on September 19, 2022, 13:20:53 PM
Milbo maybe still in vacations. Praise the lord and cross your fingers for an update with no problems.