Support » Plugin: OSM - OpenStreetMap » jQuery error

  • Hello,

    I updated an old site to the latest WordPress (5.9), and also all the Plugins, including OSM. After that there were jQuery errors due to an old jQuery version in the theme. I installed Jquery Migrate to resolve this.
    It works, but it shows me errors. One comes from OSM:

    jQuery.fn.load() is deprecated
    in the file /wp-content/plugins/osm/js/osm-metabox.js
    created by this link: /wp-admin/post.php?post=213400&action=edit

    Is there a way to fix this error? Maybe replace jQuery.fn.load() by something else?

    Thanks!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author MiKa

    (@photoweblog)

    Hello @gerdski ,

    thank you for your comment. After checking the code I was wonderin why I do not get the error … at the moment it looks like it can by solved by modifying the code OSM code. Firs I have to be able to reproduce the error on our test machine and then there is a way to fix it. Maybe we will come back to you.
    Anyway, we took it on the list for the next version to check it in more detail.

    Br, Michael

    Thread Starter Gerdski

    (@gerdski)

    Hi,

    I found a way of fixing the error in the meantime.

    Change line 64 from this:
    jQuery(window).load(function() …
    to that:
    jQuery(window).on(‘load’,function () …

    🙂

    Plugin Author MiKa

    (@photoweblog)

    Hello @gerdski,

    that was my first plan after I could reproduce the error message. Since it fixes the error on your site I will just check it on our testsites and if all is fine we will release a new version with this fix within the next week 🙂

    Thanks for your fast answere!
    Br, Michael

    Thread Starter Gerdski

    (@gerdski)

    It could have been faster 🙂
    WP changed jQuery with 5.6 I believe, and some things that were developed for old jQuery versions just broke. (I hate this!)

    Plugin Author MiKa

    (@photoweblog)

    Hello @gerdski

    let me know if it is fixed with latest version 6.0

    Thanks & br, Michael

    Thread Starter Gerdski

    (@gerdski)

    I will, as soon as I install the update…

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.