wp_register_script was called incorrectly

Hi i can see this line in log activating wp_debug

[17-Jan-2014 17:04:17 UTC] PHP Notice:  wp_register_script was called <strong>incorrectly</strong>.
Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks.
Please see <a href="http://codex.wordpress.org/Debugging_in_WordPress">Debugging in WordPress</a> for more information.
(This message was added in version 3.3.)
in /home/coachclouder/www/wp-includes/functions.php on line 3049

How i can solve it?

I attach my functions.php

thanks for advance!

  • Patrick
    • Support Monkey

    Hi @edenexposito

    That notice would be triggered by either your theme or an active plugin on your site, and is the result of an improperly-called script somewhere in the code.

    Unfortunately, it does not say which plugin/theme is at fault.

    But this message only appears when WP_DEBUG is set to “true”, correct?

    If everything is working properly, you wouldn’t need to worry about it too much. Keeping everything on your site up-to-date is the best way to ensure that such things occur as rarely as possible.

  • edenexposito
    • Design Lord, Child of Thor

    Thanks Patrick!

    My main problem is a admin-ajax.php with a loooong wait (more than 4,5s)

    You can check it in http://tools.pingdom.com/

    url: coachclouder.com -> test now

    Im using a W3 Total Cache, Cloudflare and CDN CloudFront (correctly i suppose)

    And web load time go beyond 10 seg… with high performance grade, only 1,5 Mbytes

    I dont know what is happening…

    My wordpress is almost empty (13 pages, 2 post)

    Images optimized..

    I someone could help me about that :___(

    thanks

  • edenexposito
    • Design Lord, Child of Thor

    Because “Appointments+” and “Wp Awesome Support” are disabled now to improve speed, when both plugs are activated admin-ajax show high response time and backend/frontend become really slow.

    I dont know if wpmudev can enter in my dashboard to test it, maybe its better than synchronize us to I active those plugs and you can review this.. With those plugs ON is difficult work with my dashboard due to high response time..

    Thanks for your time and response

  • Imperative Ideas
    • HummingBird

    admin-ajax.php is a common source of confusion in WordPress. It looks like it should be part of the wp-admin setup but it handles ajax requests for both the front end and the back end. Because of that, any plugin making an ajax request that takes too long to process will hold up that script.

    A slow admin ajax is usually due to a plugin/theme calling either a slow external resource, a resource that doesn’t exist, or a really poorly written DB query. It can be difficult to troubleshoot.

  • edenexposito
    • Design Lord, Child of Thor

    In My apache error log file i a lot of these errors:

    [Mon Jan 20 09:59:50 2014] [error] [client 141.101.99.65] Error Duplicate entry ‘wpas-close-8030’ for key ‘slug’ de la base de datos de WordPress para la consulta INSERT INTO wp_terms (name,slug,term_group) VALUES (‘Cerrado’,’wpas-close-8030′,0) realizada por require_once(‘wp-load.php’:wink:, require_once(‘wp-config.php’:wink:, require_once(‘wp-settings.php’:wink:, do_action(‘init’:wink:, call_user_func_array, wpas_register_default_status, wp_insert_term

    [Mon Jan 20 09:59:52 2014] [error] [client 141.101.99.65] Error Duplicate entry ‘wpas-open-7469’ for key ‘slug’ de la base de datos de WordPress para la consulta INSERT INTO wp_terms (name,slug,term_group) VALUES (‘Abierto’,’wpas-open-7469′,0) realizada por require(‘wp-blog-header.php’:wink:, require_once(‘wp-load.php’:wink:, require_once(‘wp-config.php’:wink:, require_once(‘wp-settings.php’:wink:, do_action(‘init’:wink:, call_user_func_array, wpas_register_default_status, wp_insert_term

    The problem seems was the plugin “WP awesome support”, a support ticket system for wordpress. And a register problem with wordpress DB and this plugin

    I Clean al registers from wp_terms and wp_taxonimy refer to this plugin and loop Open-close, seems be solved and now all seems works with normality, except “Use cookie-free domains” problem using CDN https://premium.wpmudev.org/forums/topic/help-for-configure-cookie-free-subdomain-wordpress-and-cloudflarecloudfront#post-592208

    thanks for all

  • edenexposito
    • Design Lord, Child of Thor

    I saw it, but i didn’t see the front end user interface…. seems that all your support system work in backend, maybe in future with a good Frontend..

    Maybe im wrong, but was my first impression… I’m correct?

    Thanks for alternative!

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.