Help tracking down an incorrect wp_enqueue_* call
-
I have error logging turned on and this error repeatedly shows up, usually in conjunction with a similar one for wp_enqueue_style:
PHP Notice: wp_enqueue_script was called <strong>incorrectly</strong>. Scripts and styles should not be registered or enqueued until the <code>wp_enqueue_scripts</code>, <code>admin_enqueue_scripts</code>, or <code>login_enqueue_scripts</code> hooks. Please see <a href="https://codex.wordpress.org/Debugging_in_WordPress">Debugging in WordPress</a> for more information. (This message was added in version 3.3.) in /wp-includes/functions.php on line 3792I’m running a Multisite Network with about a dozen themes and 3-4 dozen plugins that I took over from another developer. Is there an easier way to track down the errant wp_enqueue_[script|style] calls other than a manual process of elimination?
Personally, I think it would be nice if WP included the id of the script/style that it was trying to enqueue to make troubleshooting easier. Is this new bug/enhancement ticket territory or am I just missing something?
The topic ‘Help tracking down an incorrect wp_enqueue_* call’ is closed to new replies.