Support » Plugin: WP Download Codes » Javascript error line 69; pop up window not opening

  • Sami S

    (@sami-sanpakkila)


    Hi!

    When I update to WordPress to 5.5.1 the pop up window to view codes and manage them does not appear. The codes do list above the page when I click “list codes” and below when I click “View report”.

    But with “View report” I’m not seeing the checkboxes to reset codes so it’s a bit of a problem.

    I can see an error in the Safari debugger window that reads:
    Wp-download-codes.js
    Line 69:28 $(“#overlay”).show().live is not a function. ETC….

    Google Chrome debugger reads:
    Wp-download-codes.js?ver=5.5.1:69
    Uncaught TypeError:
    $(…).show(…).live is not a function
    at openLightbox (wp-download-codes.js?ver=5.5.1:69)
    at HTMLAnchorElement.<anynomous> (wp-download-codes.js?ver=5.5.1:69)
    at HTMLAnchorElement.dispatch (load-scripts.php?c=0.e.utils&ver=5.5.1:3)
    at HTMLAnchorElement.r.rhandle (load-scripts.php?c=0.e.utils&ver=5.5.1:3)

    I had this problem before but @miroh did a version to github that fixed the issue, now it appeared again when I updated my WordPress to 5.5.1. This happens with both WP Download codes version 2.5.4 and 2.5.3.1.

    Anyone with a hint what I could try to do to fix this?

Viewing 13 replies - 1 through 13 (of 13 total)
  • I have the same problem. For the moment i will downgrade it.

    Thread Starter Sami S

    (@sami-sanpakkila)

    Anyone else having this problem you can also install Enable jQuery Migrate Helper -plugin.

    The JQuery needs an update for the plugin, I wonder if there’s anyone capable of fixing that who is reading this support forum?

    altercat

    (@altercat)

    Having the same issue! I had installed jQuery Migrate Helper for other issues, then deactivated it because I thought everything had been fixed (most plugins have had updates) but I’m still having the problem with Download Codes’ pop up window not working.
    Will be very happy if someone can write an update for this!

    Thread Starter Sami S

    (@sami-sanpakkila)

    Hi

    Go to file wp-download-codes.js under resources -> js and on line 69 change

    $(“#overlay”).show().live(“click”, closeLightbox);

    to

    $(“#overlay”).show().on(“click”, closeLightbox);

    Make sure to clear your browser cache if it doesn’t work right away. This worked for me!

    • This reply was modified 5 months ago by Sami S.
    • This reply was modified 5 months ago by Sami S.
    altercat

    (@altercat)

    Thanks for the speedy reply!

    Updated the file with your instructions, but no success so far unfortunately. Even after clearing the cache (both server and browser-side).

    Thread Starter Sami S

    (@sami-sanpakkila)

    I think in that case you might have a conflicting plugin. If not then I have no idea…

    Thread Starter Sami S

    (@sami-sanpakkila)

    And just to double check did you actually clear your browser cache? Not WordPress cache on your browser but actual browser (Safari etc.) cache? Just checking cause that’s what got me…

    altercat

    (@altercat)

    Yes I did, I even tried from another browser to be 100% sure.

    altercat

    (@altercat)

    Any more ideas?

    Thread Starter Sami S

    (@sami-sanpakkila)

    Try deactivating all other plugins and see if that makes a difference?

    So I’ve noticed that even after clearing browser cache, and deleting the server-side cache, the old version of wp-download-codes.js is still being loaded — when debugging, the changed line still shows “live” instead of “on”. I’ve confirmed that the version on the server is correct.

    It’s clearly some kind of cache issue, I just can’t spot where the problem is exactly (I have even disabled my cache plugin after deleting its cache). I just hope it will start working at some point, once the cache expires and is renewed.

    Thread Starter Sami S

    (@sami-sanpakkila)

    Hmm.. Do you have some kind of “Asset clean up” type plugin that might have created a minified CSS/JS file that lingers on even after deactivating the plugin?

    Not sure to be honest. Maybe Jetpack?

    Tried to find a way of forcing the js file to be reloaded, but can’t really work it out. I see the file that is being loaded is being marked as ver=5.6, which is the current WordPress version. So I’m assuming it just doesn’t realise that there’s a newer version of wp-download-codes.js , and will keep loading the older one until I update to a WP version beyond 5.6.

    Ideas?

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