• Resolved yolabingo

    (@yolabingo)


    After updating WP to 3.8.1, I get this error when loading pages:

    ATTENTION! (by Comprehensive Google Map Plugin)
    Your blog/site theme or one of your plugins uses jQuery javascript library which is older than the version 1.3.0.

    I tracked the issue to line 1042 of comprehensive-google-map-plugin/assets/js/cgmp.framework.js

    var version = parseFloat($.fn.jquery);

    The current version of JQuery in WP is 1.10.3, and parseFloat() drops the trailing zero, so version = 1.1 and it fails the comparison.

    https://ww.wp.xz.cn/plugins/comprehensive-google-map-plugin/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter yolabingo

    (@yolabingo)

    This patch will work, at least until JQuery 2.x comes out 😉

    1042         var JqueryVersion = $.fn.jquery.split(".",2);
    1043         var majorJqueryVersion = Number(JqueryVersion[0]);
    1044         var minorJqueryVersion = Number(JqueryVersion[1]);
    1045         if ((majorJqueryVersion != 1) || (minorJqueryVersion < 3)) {
    1046                 alert(CGMPGlobal.errors.oldJquery);
    1047                 //Logger.fatal("Client uses jQuery older than the version 1.3.0. Aborting map generation ..");
    1048                 return false;
    1049         }

    Please note that the plugin uses the minified version of this file – cgmp.framework.min.js – so you need to minify this file after making these changes.

    Thread Starter yolabingo

    (@yolabingo)

    Ugh – just noticed the site was using an old copy of the plugin. Not sure why it did not show the available update for the plugin. Sorry

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘JQuery 1.10.2 version not correctly parsed’ is closed to new replies.