0

I am getting this error when running my website :

Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'sanitize_comment_cookies' not found or invalid function name in /homepages/9/d346623364/htdocs/wp-includes/class-wp-hook.php on line 286

Fatal error: Cannot redeclare comment_exists() (previously declared in /homepages/9/d346623364/htdocs/wp-includes/comment.php:27) in /homepages/9/d346623364/htdocs/wp-admin/includes/comment.php on line 43

Thanks for your help !

0

Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'sanitize_comment_cookies' not found or invalid function name in /homepages/9/d346623364/htdocs/wp-includes/class-wp-hook.php on line 286

This means you have a function named sanitize_comment_cookies hooked to an action or filter, either in your theme or a plugin, but that function is not available.

Look for the code: add_action('some_action_name', 'sanitize_comment_cookies') or add_filter('some_filter_name', 'sanitize_comment_cookies') and verify that the function name is correct.


Fatal error: Cannot redeclare comment_exists()

Function comment_exists is defined in wp-admin/includes/comment.php and it should not be in the second location. From the message you can assume that you have modified wp-includes/comment.php file. If that is the case, download the WordPress version you are using and replace the modified file with the original one.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.