Forums

Meta Box
Uncaught TypeError: Object [object Object] has no method 'on' (3 posts)

  1. orionis23
    Member
    Posted 1 year ago #

    I've been using Rilwis' meta box script since it's pre plugin beginnings and never had problems with it. I've got it on various different sites, both 3.2+ and 3.3+. For some reason one of my 3.2.1 sites suddenly started having trouble with the tinymce editor and other weird JS related quirks, so I checked the error logs and found this:

    Uncaught TypeError: Object [object Object] has no method 'on'

    referring to line 3 of the date.js file in the plugin:

    $( '.rwmb-date' ).on(

    What the heck is going on? I've tried deactivating other plugins, reinstalling the meta script plugin, all to no avail... yet I'm not getting the error on other 3.2.1 sites with the exact same plugin version.

    Any insight would be greatly appreciated!!!

    http://wordpress.org/extend/plugins/meta-box/

  2. orionis23
    Member
    Posted 1 year ago #

    OK, so I see this change on the github page for the scripts date.js file made 2months ago:

    move date/time from .each() to .on() as prep for cloning

    I changed out version 4.1.1 for an older version, 4.0.2 which is all I happened to still have on hand and the problem is gone, the insert link thickbox of the tinymce editor once again works, but I'm stuck with some invading css from that older version of the script...

    I also noticed that the other sites I have using the meta box script plugin that don;t have issues are not invoking the date picker, so that's why I haven't seen it on those sites...

    Any ideas??

  3. orionis23
    Member
    Posted 1 year ago #

    Think I got to the bottom of it... although I'm loading jquery on the front-end via the google cdn, the admin of WP 3.2.1 was still loading jquery 1.6. and the .on() event handler was added to the jquery api in 1.7...

    I used this solution to switch out the admin's jquery 1.6 for the most current version from google:

    http://wordpress.stackexchange.com/questions/3020/use-latest-jquery-in-wordpress-admin-interface

    Side note: yes, there are reasons why the site is still 3.2.1 and not 3.3.1, the owner is addicted to some plugins that are not yet working on 3.3...

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags