Long standing problem - Load jQuery/jQueryUI

74 views
Skip to first unread message

Luca Delpivo

unread,
Jan 12, 2017, 3:07:23 AM1/12/17
to Joomla! General Development
hi,

i can not find a pretty solution, or a solution that i like 100%.


My goal is to write and sell extensions for Joomla! So THAT they can turn without creating problems to the developers.
My problem Is that not knowing beforehand Which versions of Query / jQuery-UI uses the developers's site, i do not know which version should i use.
So i can try these different ways/solutions:

1)
Using the default versions of Joomla (version 3.6.5), using the default JS framework of Joomla, are loaded:
> Jquery: v1.12.4 (File: /media/jui/js/jquery.min.js)
> Jquery-ui: 1.9.2 (File: /media/jui/js/jquery.ui.core.min.js)
The version of jQuery-UI, however is dated!


2)
I could advise the developer to install jQuery Plugin Easy and load the version i want. But this probably will not ever will match the versions of jquery / jquery-ui developer who uses the site.


3)
In my own extension i use php "unset", so i decide what i want to load and do not load.


4)
Another solution is to do the DETECTION of what libraries are actually in use and run my JS code based on the versions that the developer is actually using. But this solution is frustrating if not feasible, because it would be too much work because I have to write code for different versions of jQuery / jQueryUI


5)
..? ...



However in any way, if i choose to use certain versions (and then i force to load those versions) this could invalidate the operation of other extensions


In order to sell extensions and make the use as easy as possible, that solutions have you adopted?


Thank you

Hannes Papenberg

unread,
Jan 12, 2017, 3:56:50 AM1/12/17
to joomla-de...@googlegroups.com
Always use the jQuery (and UI) version that ships with Joomla. If jQuery
UI is outdated, create a PR to update it so that everybody profits from
this.

Hannes

Viper

unread,
Jan 12, 2017, 5:08:18 AM1/12/17
to Joomla! General Development
jQueryUI is outdated because jQueryUI team doesn't provide "separated" version of jQueryUI since 1.11.0-beta.2(see http://jqueryui.com/download/all/). They all now in one big file. Another problem in that the jQueryUI 1.12+ have a big changes in their widget API which not is B/C with plugins/widgets written for older versions.

Luca Delpivo

unread,
Jan 12, 2017, 11:58:08 AM1/12/17
to Joomla! General Development

@Hannes: i think that what you sad is the best solution.

@Viper: in the past i have downloaded all jQuery & jQuery UI  (core files) and all their extensions ì.

Hannes Papenberg

unread,
Jan 12, 2017, 12:09:20 PM1/12/17
to joomla-de...@googlegroups.com
The conclusion still is to use the version shipped with Joomla. And for
upgrading jQuery UI: Still create a PR, but against the 4.0 branch and
help make Joomla 4.0 a reality.
> --
> You received this message because you are subscribed to the Google
> Groups "Joomla! General Development" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to joomla-dev-gene...@googlegroups.com
> <mailto:joomla-dev-gene...@googlegroups.com>.
> To post to this group, send email to joomla-de...@googlegroups.com
> <mailto:joomla-de...@googlegroups.com>.
> Visit this group at https://groups.google.com/group/joomla-dev-general.
> For more options, visit https://groups.google.com/d/optout.

ernest meyer

unread,
Feb 10, 2017, 11:43:31 PM2/10/17
to Joomla! General Development
the plugins I was using that were using jquery no longer work with the current version of jquery. I posted on this issue when jquery was first adopted in joomla, and received extremely negative responses.

My suggestion would be to use your own version of jquery and load it separately. What I do is disable jquery and the other libraries. I posted how to do that in a template on the main Joomla forums, since which time the code inserting these calls was moved. Since upgrading from Joomla 3.2, I now use a plugin which is on sourceforge, and not approved in joomla extensions, so my extremely old components still work. I also tried to publish a plugin to help with this on Joomla extdensions myself a year ago, but it is not approved either. 


Hannes Papenberg

unread,
Feb 11, 2017, 1:13:12 PM2/11/17
to joomla-de...@googlegroups.com
So your solution is to rather break other extensions instead of updating
your code to keep up with the current development. Sorry, your last 3
mails just read like you are trying to stir up unfounded conflict on
this mailinglist and I don't like that. There are several things that
you can criticise with Joomla, but the topics that you resurrected all
rather seem to be an issue on your end and not one of the project.

Hannes
Reply all
Reply to author
Forward
0 new messages