0

I got his error message above every page of my website, https://changyuan.com.tw/:

Warning: call_user_func_array() expects parameter 1 to be a valid callback, class 'Automattic\Jetpack\Extensions\Contact_Form\Contact_Form_Block' not found in /home/customer/www/changyuan.com.tw/public_html/wp-includes/class-wp-hook.php on line 324

And when I tried to log in the WordPress, the same error message appeared with an additional part as below:

Warning: call_user_func_array() expects parameter 1 to be a valid callback, class 'Automattic\Jetpack\Extensions\Contact_Form\Contact_Form_Block' not found in /home/customer/www/changyuan.com.tw/public_html/wp-includes/class-wp-hook.php on line 324 Warning: Cannot modify header information - headers already sent by (output started at /home/customer/www/changyuan.com.tw/public_html/wp-includes/class-wp-hook.php:324) in /home/customer/www/changyuan.com.tw/public_html/wp-login.php on line 502

Have tried to locate those two mentioned PHP via the File Manager in SiteGround, but just don't know what to do next, even after searching for an answer in the community. Any help would be very much appreciated. MANY THANKS!

3
  • 1
    Do you have the Jetpack plugin installed and activated? It looks like something's registering a hook that's supposed to call a static method on the Jetpack Contact_Form_Block class, but for whatever reason you don't have that class loaded. Do you have a theme or other plugin that depends on Jetpack?
    – Rup
    Commented Nov 13, 2023 at 14:44
  • Many thanks for your reply @Rup! Yes I have the Jetpack plugin installed. It should be activated as I remember, but I can not confirm that as the error is keeping me from logging in the WordPress. I do find contact-form.php, though, in my File Manager under public_html/ wp-content/ plugins/ jetpack/ extensions/ blocks/ contact-form, with the content as the following:
    – Chipmunkai
    Commented Nov 13, 2023 at 19:40
  • <?php /** * Contact Form Block. * * @package automattic/jetpack */ namespace Automattic\Jetpack\Extensions\Contact_Form; add_action( 'init', array( Contact_Form_Block::class, 'register_block' ), 9 ); add_action( 'enqueue_block_editor_assets', array( Contact_Form_Block::class, 'load_editor_scripts' ), 9 );
    – Chipmunkai
    Commented Nov 13, 2023 at 19:40

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.