0

So I took over a site with 100+ plugins. I've reduced the plugin stack to 44. With WP_DEBUG enabled; I am getting a wp_register_script was called incorrectly warning.

Is there an easy way to find out WHERE the call to the script is occurring? Something like "var dump all scripts being called incorrectly"? Something which would give further information, like the script handle perhaps.

I've looked on SE; but only find answers explaining how to fix the error; by wrapping it with the proper function. I can't seem to find an explanation of how to find the file making the call.

Thank you.

  • 1
    Have you tried downloading the plugins folder and doing a search? Note that it could also be the theme doing it. Note that until you find the location where it is being called, it's not possible to answer your question. You need to be able to mark an answer as the correct answer, not just what worked for you, but what will work for all people with this issue, the canonical defacto answer. That's not possible at the moment the way your question is worded – Tom J Nowell Oct 6 '18 at 23:48
  • Thanks Tom. I understand, I'll reword. I did find it through deactivating/reactivating plugins. I was looking for something like "var dump all scripts being called incorrectly". Giving me at least a script handle; or even better, a file location calling that script. – josh Oct 7 '18 at 0:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.