It’s possible if function (which is callback for add_filter or https://developer.ww.wp.xz.cn/reference/functions/add_action/) doesn’t exist.
You should try to flush OPcache and it’s helpful to enable Xdebug (or other solution) to get debug trace (you will see in which filter is an issue).
I don’t use OPcache
This is my WP_DEBUG mode settings:
/** Enable WP_DEBUG mode */
define( 'WP_DEBUG', true );
if ( WP_DEBUG ) {
@error_reporting( E_ALL );
@ini_set( 'log_errors', true );
@ini_set( 'log_errors_max_len', '0' );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
@ini_set( 'display_errors', 0 );
define( 'CONCATENATE_SCRIPTS', false );
define( 'SAVEQUERIES', true );
define( 'SCRIPT_DEBUG', false );
}
But I don’t see any stack trace. Just this line:
PHP Warning: call_user_func_array() expects parameter 1 to be a valid callback, no array or string given in /site_path/wp-includes/class-wp-hook.php on line 286
This gist will explain how to enable the backtrace in your website: https://gist.github.com/jrfnl/5925642
As I said here is wordpress-seo (Yoast SEO) plugin in Backtrace:
[13-Mar-2019 14:06:25 UTC] PHP Warning: call_user_func_array() expects parameter 1 to be a valid callback, no array or string given in /site_path/wp-includes/class-wp-hook.php on line 286
[13-Mar-2019 14:06:26 UTC] Backtrace from warning 'call_user_func_array() expects parameter 1 to be a valid callback, no array or string given' at /site_path/wp-includes/class-wp-hook.php 286: /site_path/wp-includes/plugin.php 208 calling apply_filters() | /site_path/wp-content/plugins/wordpress-seo/frontend/class-remove-reply-to-com.php 81 calling apply_filters() | /site_path/wp-content/plugins/wordpress-seo/frontend/class-remove-reply-to-com.php 23 calling clean_reply_to_com() | /site_path/wp-content/plugins/wordpress-seo/frontend/class-frontend.php 151 calling register_hooks() | /site_path/wp-content/plugins/wordpress-seo/frontend/class-frontend.php 198 calling __construct() | /site_path/wp-content/plugins/wordpress-seo/inc/wpseo-functions.php 19 calling get_instance() | /site_path/wp-includes/class-wp-hook.php 286 calling initialize_wpseo_front() | /site_path/wp-includes/class-wp-hook.php 310 calling apply_filters() | /site_path/wp-includes/plugin.php 465 calling do_action() | /site_path/wp-settings.php 505 calling do_action() | /site_path/wp-config.php 210 calling require_once() | /site_path/wp-load.php 37 calling require_once() | /site_path/wp-blog-header.php 13 calling require_once() | /site_path/index.php 17 calling require()
Solution:
Add to theme functions.php file:
add_filter( 'wpseo_remove_reply_to_com', '__return_false' );
instead of
add_filter( 'wpseo_remove_reply_to_com', false );
Related:
https://ww.wp.xz.cn/support/topic/readers-cant-answer-comments/
https://ww.wp.xz.cn/support/topic/replytocom-removal-breaks-wp-touch-pro-nested-comments/#post-10072157
-
This reply was modified 7 years, 2 months ago by
AiratTop.
@airathalitov Could you mark this topic as resolved please ?