drtonyb
Forum Replies Created
-
Forum: Plugins
In reply to: [Comprehensive Google Map Plugin] jquerey error after wordpress 3.6 updatetheshine,
When I first looked at your site, it was loading jQuery 1.7.2 and jQuery 1.10.2 – it’s not now, so it doesn’t look to me like it is back to the original state after you upgraded to WordPress 3.6 and made the fix to CGMP.
Forum: Plugins
In reply to: [Comprehensive Google Map Plugin] jquerey error after wordpress 3.6 updatecrienoloog,
You are looking at the wrong bit of code. Look for 1.3 – in cgmp.framework.min.js it is on the third last line near the end of the line – should find
m=parseFloat(a.fn.jquery);if(1.3>m)
The other test that are are looking at (m=parseFloat(a.fn.jquery);1.4<=m?), although needs fixing, is not critical and won’t stop CGMP working.
Forum: Plugins
In reply to: [Comprehensive Google Map Plugin] jquerey error after wordpress 3.6 updatecrienoloog,
What version of CGMP do you have? As far as I’m aware the latest version is 7.0.31
Forum: Plugins
In reply to: [Comprehensive Google Map Plugin] jquerey error after wordpress 3.6 updatedecisive,
Nobody can help if we can’t see your site
Forum: Plugins
In reply to: [Comprehensive Google Map Plugin] jquerey error after wordpress 3.6 updatetheshine,
Are you able to put your site back to its state where the only modification is to the version check in assets/js/cgmp.framework.min.js?
To use any version of jQuery from 1.9.0 onwards you need to include
<script src="https://code.jquery.com/jquery-migrate-1.2.1.js"></script>
for the map code to function without errors.
Forum: Plugins
In reply to: [Comprehensive Google Map Plugin] jquerey error after wordpress 3.6 updatesunshine,
Your comment // in minimised code like this comments out the entire line which removes more code than just one statement.
I think jQuery 1.6.4 might be coming from your slider plugin
Forum: Plugins
In reply to: [Comprehensive Google Map Plugin] jquerey error after wordpress 3.6 updatethesunshine,
You are loading two versions of jQuery for starters (not a good idea) – version 1.6.4 from google’s CDN and 1.10.2 from your local wordpress installation.
Error in your modification of assets/js/cgmp.framework.min.js
//if(/1\.[0-2]\.[0-9]{1,2}/.test(a.fn.jquery))
should be
if(/1\.[0-2]\.[0-9]{1,2}/.test(a.fn.jquery))
The // is a comment and removes a lot of code.
Forum: Plugins
In reply to: [Comprehensive Google Map Plugin] jquerey error after wordpress 3.6 updateponderconsulting,
Certainly it works with the mistake – it will always work with the mistake, even if you have version 0 or xyz of jQuery!
Forum: Plugins
In reply to: [Comprehensive Google Map Plugin] jquerey error after wordpress 3.6 updateasutosh,
You have made the same mistake as ponderconsulting did. Change
m=parseFloat(a.fn.jquery);if(1.3>m)return alert(i.oldJquery),!1;
to
if(/1\.[0-2]\.[0-9]{1,2}/.test(a.fn.jquery))return alert(i.oldJquery),!1;
Forum: Plugins
In reply to: [Comprehensive Google Map Plugin] jquerey error after wordpress 3.6 updateponderconsulting,
The change you say you made isn’t quite correct! Should be
if(/1\.[0-2]\.[0-9]{1,2}/.test(a.fn.jquery))return alert(i.oldJquery),!1;
not
parseFloat(a.fn.jquery);if(/1\.[0-2]\.[0-9]{1,2}/.test(a.fn.jquery)>m)return alert(i.oldJquery),!1;
You can remove m=parseFloat(a.fn.jquery);
and the test doesn’t compare with m
Forum: Plugins
In reply to: [Comprehensive Google Map Plugin] jquerey error after wordpress 3.6 updateI’m a bit puzzled why some people have had so much trouble fixing this jQuery version issue. WordPress 3.6 is loading jQuery version 1.10.2 by default.
The plugin’s jQuery version test needs improving. Converting a version string like 1.10.2 to a floating point number just gives 1.1 which is obviously less than 1.3 and consequently fails the test.
A better test is testing the string itself. In the file assets/js/cgmp.framework.min.js, I replaced
m=parseFloat(a.fn.jquery);if(1.3>m)
with
if(/1\.[0-2]\.[0-9]{1,2}/.test(a.fn.jquery))
Note that the letter a in a.fn.jquery might be a different letter in your version – use the same letter as in your version, otherwise the fix won’t work.
Similarly, in the file assets/js/cgmp.framework.js, I replaced
var version = parseFloat($.fn.jquery); if (version < 1.3) {
with
if(/1\.[0-2]\.[0-9]{1,2}/.test($.fn.jquery)) {
Using the jquery-updater plugin fixes the issue because it makes WordPress use jQuery version 2.0.0 (this isn’t latest version of jQuery by the way), so the original version test works – 2 < 1.3 is false.