I don’t know how but now I am getting this error :
Notice: wp_enqueue_style was called
incorrectly. Scripts and styles should not be registered or enqueued
until the wp_enqueue_scripts, admin_enqueue_scripts, or
login_enqueue_scripts hooks. Please see Debugging in WordPress for
more information. (This message was added in version 3.3.) in
wp-includes/functions.php on line 3049Notice: wp_enqueue_script was called incorrectly. Scripts and styles
should not be registered or enqueued until the wp_enqueue_scripts,
admin_enqueue_scripts, or login_enqueue_scripts hooks. Please see
Debugging in WordPress for more information. (This message was added
in version 3.3.) in wp-includes/functions.php on line 3049Warning: Cannot modify header information – headers already sent by
(output started at wp-includes/functions.php:3049) in wp-login.php on
line 415Warning: Cannot modify header information – headers already sent by
(output started at wp-includes/functions.php:3049) in wp-login.php on
line 427
This is what I get when I try to log in… On other sites, I have only two first errors. I try to fix it but I can’t. Any suggestions?
Disable all plugins and switch to the default theme. It should be gone now.
Then enable each addon step by step, until the problem comes back. You know the source now, let’s say a plugin.
The plugin calls probably wp_enqueue_script
too early. Find all occurrences of that function, then make sure they are bound to specific actions:
-
wp_register_script()
should be called for the actionwp_loaded
-
wp_enqueue_script
on one of the actions-
wp_enqueue_scripts
, -
admin_enqueue_scripts
, -
customize_controls_enqueue_scripts
or -
login_enqueue_scripts
(see this thread for the latter).
-