{"id":16326570,"date":"2022-12-28T21:16:36","date_gmt":"2022-12-28T21:16:36","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/contact-form-7-white-screen-fata-error-unknown\/"},"modified":"2022-12-28T21:16:36","modified_gmt":"2022-12-28T21:16:36","slug":"contact-form-7-white-screen-fata-error-unknown","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/contact-form-7-white-screen-fata-error-unknown\/","title":{"rendered":"Contact Form 7 White Screen\/Fata Error Unknown"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">This is the error I got when I turned on the debugger in wp-config.php:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Fatal error<\/strong>: Uncaught TypeError: call_user_func_array(): Argument #1 ($callback) must be a valid callback, no array or string given in \/opt\/bitnami\/wordpress\/wp-includes\/class-wp-hook.php:308 Stack trace: #0 \/opt\/bitnami\/wordpress\/wp-includes\/plugin.php(205): WP_Hook-&gt;apply_filters() #1 \/bitnami\/wordpress\/wp-content\/plugins\/contact-form-7\/includes\/functions.php(216): apply_filters() #2 \/bitnami\/wordpress\/wp-content\/plugins\/contact-form-7\/includes\/contact-form.php(851): wpcf7_autop_or_not() #3 \/bitnami\/wordpress\/wp-content\/plugins\/contact-form-7\/includes\/contact-form.php(923): WPCF7_ContactForm-&gt;replace_all_form_tags() #4 \/bitnami\/wordpress\/wp-content\/plugins\/contact-form-7\/includes\/contact-form.php(623): WPCF7_ContactForm-&gt;form_elements() #5 \/bitnami\/wordpress\/wp-content\/plugins\/contact-form-7\/includes\/contact-form-functions.php(229): WPCF7_ContactForm-&gt;form_html() #6 [internal function]: {closure}() #7 \/bitnami\/wordpress\/wp-content\/plugins\/contact-form-7\/includes\/l10n.php(147): call_user_func() #8 \/bitnami\/wordpress\/wp-content\/plugins\/contact-form-7\/includes\/contact-form-functions.php(233): wpcf7_switch_locale() #9 \/opt\/bitnami\/wordpress\/wp-includes\/shortcodes.php(355): wpcf7_contact_form_tag_func() #10 [internal function]: do_shortcode_tag() #11 \/opt\/bitnami\/wordpress\/wp-includes\/shortcodes.php(227): preg_replace_callback() #12 \/opt\/bitnami\/wordpress\/wp-includes\/class-wp-hook.php(308): do_shortcode() #13 \/opt\/bitnami\/wordpress\/wp-includes\/plugin.php(205): WP_Hook-&gt;apply_filters() #14 \/bitnami\/wordpress\/wp-content\/themes\/leadstart\/template-parts\/content-notitle.php(16): apply_filters() #15 \/opt\/bitnami\/wordpress\/wp-includes\/template.php(785): require(&#8216;&#8230;&#8217;) #16 \/opt\/bitnami\/wordpress\/wp-includes\/template.php(718): load_template() #17 \/opt\/bitnami\/wordpress\/wp-includes\/general-template.php(204): locate_template() #18 \/bitnami\/wordpress\/wp-content\/themes\/leadstart\/blank-page.php(12): get_template_part() #19 \/opt\/bitnami\/wordpress\/wp-includes\/template-loader.php(106): include(&#8216;&#8230;&#8217;) #20 \/opt\/bitnami\/wordpress\/wp-blog-header.php(19): require_once(&#8216;&#8230;&#8217;) #21 \/opt\/bitnami\/wordpress\/index.php(17): require(&#8216;&#8230;&#8217;) #22 {main} thrown in&nbsp;<strong>\/opt\/bitnami\/wordpress\/wp-includes\/class-wp-hook.php<\/strong>&nbsp;on line&nbsp;<strong>308<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I tried removing autop so many ways in the past but I had an issue where it caused a fatal error anytime I tried to use the Contact Form 7 plugin. I think there needs to be a fixed in the next release. <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/remove autop from everywhere\n\nremove_filter('widget_text_content', 'wpautop');\n\nremove_filter('the_excerpt', 'wpautop');\n\nremove_filter('the_content', 'wpautop');\n\nremove_filter('widget_text_content', 'wpautop');\n\nremove_filter('the_content', 'wptexturize');\n\nadd_filter('widget_text_content', 'leadstart_removing_autop', 999);\n\nadd_filter('widget_custom_html_content', 'leadstart_removing_autop', 999);\n\nfunction removing_autop($content)\n\n{\n\n&nbsp; $content = str_replace(&#091;'&lt;p&gt;', '&lt;\/p&gt;'], &#091;'', ''], $content);\n\n&nbsp; return $content;\n\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">I am using PHP version 8.1.<\/p>\n","protected":false},"template":"","class_list":["post-16326570","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/16326570","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/16326570\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=16326570"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}