• Resolved curlybracket

    (@veganist)


    Hi Thomas,

    thank you for your very useful plugin!

    I am using WP 5.5.3 and the plugin does not work correctly with posts that have images in them.

    The file image-source-control-isc/admin/assets/js/post.js throws this error in the JS console:

    Uncaught TypeError: jQuery(...).live is not a function
        at IscBlockForm.attach (post.js:182)
        at HTMLDocument.<anonymous> (post.js:221)
        at i (jquery.js:2)
        at Object.fireWith [as resolveWith] (jquery.js:2)
        at Function.ready (jquery.js:2)
        at HTMLDocument.J (jquery.js:2)

    When I change lines 182 and 192
    from

    jQuery(main_selector).live('submit', function(){
    jQuery(fields[id].selector).live('change', function(){

    to

    jQuery(main_selector).on('submit', function(){
    jQuery(fields[id].selector).on('change', function(){

    Everything works as expected. You might want to change this in the code.

    The live() function has been deprecated in newer versions of jQuery, see https://api.jquery.com/live/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Thomas Maier

    (@webzunft)

    Hi curlybracket,

    thanks for your email.

    You are right about the issue. It is fixed in ISC 2.0, which you can download for testing from here.

    It is ready for release, but I am too tight up at my day job right now to do this. You can see that users tested it successfully in the other threads here in the forum.

    Thanks,
    Thomas

    Thread Starter curlybracket

    (@veganist)

    Hi Thomas!

    thanks, that’s great. I guess I’ll wait for the release ??
    In the meantime, my fix works ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Plugin throws JS error’ is closed to new replies.