• Resolved Jed

    (@jerrald)


    Good day, I activated the Enable jQuery Migrate Helper plugin on our site and it displays a warning message regarding jQuery.fn.load() and jQuery.fn.live(). How can I determine what plugin or theme has the deprecated code? TIA. Keep safe everyone

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Marius L. J.

    (@clorith)

    Hiya,

    if it’s showing up in the admin area, then a notice should show telling you the file path, including the plugin or theme directory that has the file.

    If you are on the front-end of your site, and looking in your JavaScript console, it will often display a list of files under it (you may need to hit the little arrow to show the list of files), and you work your way down from the top, it should be the thing right before this plugin.

    Thread Starter Jed

    (@jerrald)

    @clorith Thanks for your response. Btw this is the view of jQuery Migrate Helper from my admin area: https://pasteboard.co/JohnibF.jpg

    Plugin Author Marius L. J.

    (@clorith)

    So, it looks like the code that’s causing issues has been placed inline (not in a separate file), this is why you only get the warning, but no indication of what file caused it.

    To find the culprit here, there are two approaches you can choose from.
    Firstly, using Troubleshooting Mode from the Health Check plugin, make sure you enable the Enable jQuery Migrate Helper plugin first, and then start re-enabling individual plugins one by one until the problem reappears, you’ll then know that the last thing to be enabled is what is causing it.

    Or, since you know what code caused an issue, search for it in your code, you want to look for .live( or .load( in this scenario, and when you find the file that holds that code, you know what caused it. (If you don’t know how to search through your sites code for this, the String Locator Plugin might be able to help you out)

    Thread Starter Jed

    (@jerrald)

    @clorith Thanks for bringing up the String Locator plugin. Im able to find where those deprecated codes are. The fn.live() is located on the wp-includes/js/jquery/jquery-migrate.js. While .load() is located on one of our inactive plugin.

    Plugin Author Marius L. J.

    (@clorith)

    So I can tell you right now, the file in wp-includes is a core file, that is not what is causing you issues here.

    If you’re correct that the plugin you believe has the other code is deactivate, something may be enqueueing an external resource, you would then have to do the troubleshooting steps as mentioned above to try and narrow it down further.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How can I know what plugin/theme has the issue’ is closed to new replies.