jquery ui broken?

Ask the community for help and support.
Post Reply
loop
VIP Member
VIP Member
Posts: 230
Joined: Thu Mar 25, 2021 12:26 pm
Has thanked: 7 times
Been thanked: 3 times

jquery ui broken?

Post by loop »

Hi Everybody, i coded today a lot and i recocgnized, that on categories.php (without changing there anything) the image sorting does not work anymore, i could swear it worked at the beginning (but don't know what i changed)
i received alway a error:
Uncaught TypeError: $(...).sortable is not a function

after debugging i tried to replace:
<script src="<?= tep_catalog_href_link('ext/jquery/ui/jquery-ui-1.10.4.min.js') ?>"></script>
with the newst version:
<script src="https://code.jquery.com/ui/1.12.1/jquer ... "></script>

and everything worked! i'm not sure if i changed that / plugin changed that, but i have a hook which includes:
<script src="https://cdnjs.cloudflare.com/ajax/libs/ ... ery.min.js" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"></script>

not sure if a plugin changed to the newest jquery and then the ui did not work anymore? at the moment i don't get it.....maybe somebody has a idea?
WP Horlogebanden
Posts: 7
Joined: Thu Mar 25, 2021 7:35 pm
Has thanked: 1 time

Re: jquery ui broken?

Post by WP Horlogebanden »

Hi,
I am rather new to the use of Bootstrap, jQuery and Cloudflare. However, it seems that your problem is similar to my problem (trying to create a icom-menu-pulldowlist in Phoenix). They are caused by a mix of versions of jQuery, it seems.
Bootstrap contains jQuery. It is unclear to me why jQuery needs to be linked sparately in some sources of Phoenix. I notice that in my shop (which was stated as OsCommerce-Phoenix 1.7.9 and then upgraded) I have jQuery 3.5.1 while the current version of jQuery is 3.6.0
Bootstrap current version is 4.1.3 but BootstrapCDN is 4.6.0.
At https://jquery-ui-bootstrap.github.io/j ... bootstrap/ I read:
In their original forms, jQuery UI and Bootstrap can't coexist resulting in conflicts with both CSS classes and styles as well as JavaScript when you do try to use them. jQuery UI Bootstrap provides the JavaScript and CSS required to quickly start a project using both jQuery UI and Twitter Bootstrap.
I have not figured out if this will solve my problem, but I hope my reaction is helpfull to you.
loop
VIP Member
VIP Member
Posts: 230
Joined: Thu Mar 25, 2021 12:26 pm
Has thanked: 7 times
Been thanked: 3 times

Re: jquery ui broken?

Post by loop »

Can somebody helps me? Again i'm very confused with the JQUERY UI
first i had to replace the ui to 1.12.1 version, that it works, and while coding a custom module, i recognized that the ui did not make a "close icon", after googling:
https://stackoverflow.com/questions/173 ... close-icon
there is written:
The reason this is happening, is because you are calling bootstrap in, after you are calling jquery-ui in.
so after putting jquery-ui.min.js just before application_bottom.php everything works

do i mix something strange or does the jquery UI is not really working in the current 1.0.81 version? (which i cannot believe, as there has to be more problems out and not just my post...)

if somebody could explain whats going on with jquery UI would be great
Post Reply