Saturday 11 January 2014

wp_localize_script was called incorrectly

Website showing the following error: 
Notice: wp_localize_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 /public_html/wp-includes/functions.php on line 3049

Go to wp-config.php and make the following changes and check if it will work

define('WP_DEBUG', true); to define('WP_DEBUG', false);

It is not recommended to use WP_DEBUG or the other debug tools on live sites; they are meant for local testing and staging installs.

2 comments:

  1. Is this a joke? That's not fixing the problem thats hidding the error message

    ReplyDelete
  2. What is this ????
    This is not a fix

    ReplyDelete

ERR_CONTENT_DECODING_FAILED

If you are getting the error as ERR_CONTENT_DECODING_FAILED while accessing the domain then add the below extension in php.ini  ++++++++...