jqeury.min.js conflict - Page 2 jqeury.min.js conflict - Page 2
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

jqeury.min.js conflict

Started by allvip, November 26, 2013, 01:41:20 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

allvip

I removed the posts about picture navigation plugin.it was an error in theme.php

When I posted about jquery can not be included in template.html I was testing on the curve theme.
after that I used my new theme that had an error in theme.php

allvip

js/util.js for admin tools

replace attr (is found twice in util.js) with prop

http://api.jquery.com/prop/

now admin tools (util.php) works with jquery-1.11.0.min.js

I uploaded jquery-1.11.0.min.js in the js folder of coppermine.
I replaced js_include('js/jquery-1.3.2.js'); with js_include('js/jquery-1.11.0.min.js'); in include/init.inc.php

Now coppermine is using version 1.11.0

I do not know all the coppermine files that uses jquery-1.3.2.js from include/init.inc.php but it looks like everyting is working fine.

Now I do not have to include jquery in template.html or any other page for a jquery plugin to work unless the plugin is not working with 1.11.0.

allvip

If a jquery plguin is not working with the latest jquery version 1.11.0,I will have to use the solution from Reply #17 or find out how to use jquery no conflict or  use Load Scripts Plugin http://forum.coppermine-gallery.net/index.php/topic,74696.0.html

Αndré

IMHO it would be way easier and straightforward to replace the embedded jQuery version via a plugin, which contains a list of compatible/incompatible pages and then uses the corresponding jQuery file.

For a start we need a reliable list what exactly doesn't work with later jQuery versions.

allvip

Quote from: Αndré on February 03, 2014, 12:00:16 PM
For a start we need a reliable list what exactly doesn't work with later jQuery versions.

Your asking about coppermine pages or about the jquery plugins I use in the theme?

Anyway all the jquery plugins from my theme work with 1.11.0 (In my last reply I just said IF I will need a older version...)

Αndré

As we (the Coppermine development team) don't care about jQuery plugins, we need a list of Coppermine pages/features/functions which don't work with more recent jQuery version. I already noticed some time ago, that the album manager doesn't work with later jQuery versions (if I remember correctly I tested jQuery 1.4 back then).

allvip

I will post a list after half an hour.

Αndré

Take your time, this is no urgent issue (at least it isn't for me).

phill104

So far I have upgraded to jQuery 1.11.0.min.js and all appears to be working well with just the edits to util.php in place (along with all the calls to 1.3.2) but we need to test with as many themes and plugins as possible.
It is a mistake to think you can solve any major problems just with potatoes.

allvip

#29
tested on coppermine 1.5.24 with jquery-1.11.0.js

everything is working but Admin tools (util.php) and the Date Picker from Ban Users (banning.php) is not working.

util.js updated like I posted in reply 21 and now Admin tool is working.

Date Picker - js/jquery.datePicker.js is using jquery 1.3.2 like it says on the plugin page:

http://www.kelvinluck.com/assets/jquery/datePicker/v2/demo/

If I add  js_include('js/jquery-1.3.2.js'); to banning.php is not working- jquery conflict

I tested all the links from the menu and on every page I made all the possible actions browse by date,edit,delete,ban,slideshow,image watermarking etc (in config I did not test all the irelevant settings)

Can not test bridgemgr.php - I do not have a forum.

Abbas Ali

We need to update the bundled jquery to the latest stable version and update any core coppermine code to work with latest stable version of jquery.

@allvip: If I understand you correctly, only two things are not working with latest jquery.

  • date picker
  • banning.php
Correct me if I am wrong.
Chief Geek at Ranium Systems

Abbas Ali

And yes, there might be many third party plugins and themes using jquery (older version). We can't really help that and the respective authors will have to update their themes/plugins as well. We can only support and update the themes/plugins which the core dev team has developed.
Chief Geek at Ranium Systems

phill104

Quote from: Abbas Ali on February 04, 2014, 06:14:58 AM
We need to update the bundled jquery to the latest stable version and update any core coppermine code to work with latest stable version of jquery.

@allvip: If I understand you correctly, only two things are not working with latest jquery.

  • date picker
  • banning.php
Correct me if I am wrong.

Thanks for your input Abbas.

As far as I can see those are the only 2 problems other than the 2 changes mentioned above in util.js
It is a mistake to think you can solve any major problems just with potatoes.

Αndré

I'd like to schedule this for cpg1.6.x, or do you see a reason why we need to update it in cpg1.5.x, which will probably cause issues for some users.

Abbas Ali

I second the idea of doing it in cpg1.6.x. Its always good to update third party libs in a major release and minor release should be just for bug fixes.
Chief Geek at Ranium Systems

allvip

Quote from: Abbas Ali on February 04, 2014, 06:14:58 AM
We need to update the bundled jquery to the latest stable version and update any core coppermine code to work with latest stable version of jquery.

@allvip: If I understand you correctly, only two things are not working with latest jquery.

  • date picker
  • banning.php
Correct me if I am wrong.


banning.php works fine.I can add a user to ban,delete a user etc.Only the date picker from the page is not working.

I added js_include('js/jquery-1.3.2.js'); to banning.php to make the date picker to work,but the date picker is still not working.Jquery coonflict-banning.php uses 1.11.0 from include/init.inc.php and 1.3.2

phill104

Quote from: Abbas Ali on February 04, 2014, 09:31:47 AM
I second the idea of doing it in cpg1.6.x. Its always good to update third party libs in a major release and minor release should be just for bug fixes.

I totally agree, it is something we should keep on top of so when we do release 1.6.x the latest version is packaged. Currently as far as I can see there are no security implications of remaining with Jquery 3.2.2 and there are few users who do experience problems using that version. jQuery 2.x is also release but that does not work with IE6,7 or 8 so not really something we should consider at this time but maybe by the time CPG1.6 is released we should it could be.

If we can document what changes are required in this thread for those users that would like to update at their own risk then that may be helpful.
It is a mistake to think you can solve any major problems just with potatoes.

allvip

Quote from: Phill Luckhurst on February 04, 2014, 10:51:58 AM
If we can document what changes are required in this thread for those users that would like to update at their own risk then that may be helpful.

1.Upload jquery-1.11.0.min.js in the js folder (js folder is in the coppermine root)

2.replaced js_include('js/jquery-1.3.2.js'); with js_include('js/jquery-1.11.0.min.js'); in include/init.inc.php

3.js/util.js for admin tools

replace attr (is found twice in util.js) with prop

4.I don't know about security but I don't see how the latest version of jquery can afect that.

5.If someone uses some jquery plugin on their personal theme it proabibly works with 1.11.0.Most jquery plugins from google are updated by the developer.Is rare to find a plugin that is not updated like datepicker.

My coppermine works perfect.

If there is some plugin or theme they use and does not work they  can post it here so everybody will know is not working with 1.11.0 and on the theme or plugin topic so contributors can update.
Something tell me but they do work.I will test them all.

allvip

Quote from: Αndré on February 04, 2014, 09:10:23 AM
I'd like to schedule this for cpg1.6.x, or do you see a reason why we need to update it in cpg1.5.x, which will probably cause issues for some users.

Can I please know wath issues can cause?If is not to much to ask.

Abbas Ali

We really don't know what issues it may cause as that depends on the third party themes and plugins users are using. For example: if a certain user is using a certain third party theme or plugin which is dependent on the bundled jquery 1.3.x version than that theme or plugin will break.
Chief Geek at Ranium Systems