• Resolved ceslad

    (@ceslad)


    Olá,

    Toda vez que o site é acessado dentro da página Loja do WooCommerce, percebo que um erro de log e mostrado dentro da pasta log do wordpress. Um exemplo é o erro que está abaixo, com hora e data de acesso do site na página loja, inclusive com caminho da pasta, arquivo e linha:

    [Thu Apr 05 23:25:03.897713 2018] PHP Warning: call_user_func_array() expects parameter 1 to be a valid callback, function ‘__return_empty_null’ not found or invalid function name in web/wp-includes/class-wp-hook.php on line 288

    Como faço para resolver isso? Alguém poderia me ajudar?

    Desde já, agradeço.

    • This topic was modified 6 years ago by ceslad.
Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support AW a11n

    (@slash1andy)

    Automattic Happiness Engineer

    Hey there!

    That is likely an issue with a theme or plugin needing updating.

    You can also turn off the logging so that it’s not logging every warning, using this: https://codex.wordpress.org/WP_DEBUG

    Thread Starter ceslad

    (@ceslad)

    @slash1andy,

    em que parte do “WP-CONFIG.PHP” eu devo colocar “define (‘WP_DEBUG’, false);” para desativar o registro dos erros?

    Mesmo que eu desative o registro, os erros continuarão a ser registrados? Ou seja, o problema não seria resolvido.

    O que isso pode acarretar para a performance do site?

    Obrigado.

    Plugin Support con

    (@conschneider)

    Engineer

    Hello again,

    > in which part of “WP-CONFIG.PHP” should I put “define (‘WP_DEBUG’, false);” to disable error logging?

    Put in few lines before /* That’s all, stop editing! Happy blogging. */ .

    > Even if I turn off logging, will the errors continue to be logged? That is, the problem would not be solved.

    No but you can only log to the file and suppress the error output in the front end via:

     // Enable WP_DEBUG mode
    define( 'WP_DEBUG', true );
    
    // Enable Debug logging to the /wp-content/debug.log file
    define( 'WP_DEBUG_LOG', true );
    
    // Disable display of errors and warnings 
    define( 'WP_DEBUG_DISPLAY', false );
    @ini_set( 'display_errors', 0 ); 

    > What can this entail for the performance of the site?

    Logging does take some resources, but the performance should not be affected. Unless you have a small server and a big crowd.

    Thread Starter ceslad

    (@ceslad)

    Olá, @conschneider.

    Entrei no WP-CONFIG.PHP e constatei que já existe o código define (‘WP_DEBUG’, false);

    Não entendi qual seria a função desse outro código que você me passou (abaixo):

    // Enable WP_DEBUG mode
    define( ‘WP_DEBUG’, true );

    // Enable Debug logging to the /wp-content/debug.log file
    define( ‘WP_DEBUG_LOG’, true );

    // Disable display of errors and warnings
    define( ‘WP_DEBUG_DISPLAY’, false );
    @ini_set( ‘display_errors’, 0 );

    Eu o colocaria também no WP-CONFIG.PHP? Em que parte eu o colocaria?

    Desde já, agradeço.

    • This reply was modified 6 years ago by ceslad.
    Thread Starter ceslad

    (@ceslad)

    Olá, @consider.

    Agora, começou a aparecer o código abaixo, dentro da pasta de erros de log:

    [Sat Apr 07 09:17:21.896264 2018] [php7:notice] The The wc_add_to_cart_message filter function is deprecated since version 3.0. Replace with wc_add_to_cart_message_html.,
    No log handling enabled – turning on stderr logging
    Created directory: /var/lib/net-snmp
    Created directory: /var/lib/net-snmp/mib_indexes

    • This reply was modified 6 years ago by ceslad.
    • This reply was modified 6 years ago by ceslad.
    Laurena Rehbein

    (@lrehbein)

    Automattic Happiness Engineer

    Hi there,

    That code there is a “deprecated” notice, just notifying developers that code is changing and they will need to use different code, in the future.

    Hope that helps explain!

    Joel Williams

    (@joelwills)

    Automattic Happiness Engineer

    Hi there!

    There hasn’t been a reply for a while so I’m going to close this ticket.

    If you’re still having problems please open a new ticket, thanks!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘WooCommerce erro log’ is closed to new replies.