WordPress.org

Forums

Comprehensive Google Map Plugin
[resolved] jQuery error (14 posts)

  1. Ankit Gade
    Member
    Posted 1 year ago #

    It is currently not compatible with the jquery version throws warning by a popup and do not work.

    http://wordpress.org/plugins/comprehensive-google-map-plugin/

  2. gozoinks
    Member
    Posted 1 year ago #

    Agreed. The problem seems to be in the use of parseFloat, which sees (for example) "1.10.1" and returns "1.1".

    You will not be able to do a straight numerical greater-than/less-than comparison using jQuery's version number string format. This plugin should use a different method to compare versions, one which splits up the string and compares the major, minor and increment separately, as discussed here:

    http://stackoverflow.com/questions/1073423/jquery-plugin-check-version/3113749#3113749

    In particular:

    http://phpjs.org/functions/version_compare/

  3. poco06
    Member
    Posted 1 year ago #

    Hello,

    Is there any solution to apply to comprehensive google map plugin to avoid this issue ?
    Thanks
    Pat

  4. gozoinks
    Member
    Posted 1 year ago #

    I've done it by replacing the relevant popup conditional with 'false'.

    In the comprehensive-google-map-plugin/assets/js/cgmp.framework.min.js file, I replaced this bit of code (near the end of the file, line 33 in my editor):

    m=parseFloat(a.fn.jquery);if(1.3>m)return alert(i.oldJquery),!1;

    with this:

    m=parseFloat(a.fn.jquery);if(false)return alert(i.oldJquery),!1;

    By doing this, the conditional that checks the version always returns false, which in this case means 'not a problem', and so the alert doesn't appear.

    The change is applied to the .min.js file because that's the one the plugin actually loads.

    Because the file is minimized, everything all runs together, so you'll want to work carefully.

    This isn't an actual fix, of course; it just silences the Javascript alert() popup.

  5. poco06
    Member
    Posted 1 year ago #

    Good

    Many thanks for your support.
    Pat

  6. marciaivey
    Member
    Posted 1 year ago #

    thank you gozoinks- having the same problem and working on fixing this now.

  7. Chris Dillon
    Member
    Posted 1 year ago #

    Another workaround: just disable the alert and ensure you're always loading the right jQuery.

    (edited; Sorry, I posted some code without proper testing.)

  8. mbdev
    Member
    Posted 1 year ago #

    Will there be a fix for this problem issued by the plugin author?

  9. lornix
    Member
    Posted 1 year ago #

    @gozoinks - worked like a charm - many thanks!

  10. garymgordon
    Member
    Posted 1 year ago #

    @gozoinks .. thank you. But .. how can I figure out what plugin (if that's what it is) that is using the older jQuery? How do I go about correcting the jQuery so I can have it use the newer one for this plugin .. so all will be happy in the future? Any advice? (I saw mentioned "The problem seems to be in the use of parseFloat" .. but I'm not sure what this means exactly and how to get this issue to be resolved .. correctly, and not just a patch. haha

  11. SuperDupont
    Member
    Posted 1 year ago #

    Hi all, this is not an error from the "Comprehensive Google Map Plugin", this is a global known error in WordPress, follow this link for more details and solution:

    WordPress 3.6 and jQuery.BlockUI Version problem - solution
    http://wordpress.org/support/topic/wordpress-36-and-jqueryblockui-version-problem-solution?replies=22

  12. SuperDupont
    Member
    Posted 1 year ago #

    But the fix above (replacing the bit of code) works very well and is simple to do :))
    Thx for all guys !

  13. alexanderzagniotov
    Member
    Plugin Contributor

    Posted 1 year ago #

    Please update to v.8.0.1 and give it a go again

  14. alexanderzagniotov
    Member
    Plugin Contributor

    Posted 1 year ago #

    The issue has been resolved in v8.0.1

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Comprehensive Google Map Plugin
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.