• Resolved oasiswork07

    (@oasiswork07)


    Hello,
    After upgrading to PHP 8.1 below error is getting generated on the pages where contact form is used, any suggestions how to fix it?

    <pre>
    Fatal error: Uncaught TypeError: call_user_func_array(): Argument #1 ($callback) must be a valid callback, no array or string given in /home/XXX/public_html/wp-includes/class-wp-hook.php:326
    Stack trace:
    #0 /home/XXX/public_html/wp-includes/plugin.php(205): WP_Hook->apply_filters()
    #1 /home/XXX/public_html/wp-content/plugins/contact-form-7/includes/functions.php(219): apply_filters()
    #2 /home/XXX/public_html/wp-content/plugins/contact-form-7/includes/contact-form.php(886): wpcf7_autop_or_not()
    #3 /home/XXX/public_html/wp-content/plugins/contact-form-7/includes/contact-form.php(958): WPCF7_ContactForm->replace_all_form_tags()
    #4 /home/XXX/public_html/wp-content/plugins/contact-form-7/includes/contact-form.php(658): WPCF7_ContactForm->form_elements()
    #5 /home/XXX/public_html/wp-content/plugins/contact-form-7/includes/contact-form-functions.php(269): WPCF7_ContactForm->form_html()
    #6 [internal function]: {closure}()
    #7 /home/XXX/public_html/wp-content/plugins/contact-form-7/includes/l10n.php(147): call_user_func()
    #8 /home/XXX/public_html/wp-content/plugins/contact-form-7/includes/contact-form-functions.php(273): wpcf7_switch_locale()
    #9 /home/XXX/public_html/wp-includes/shortcodes.php(434): wpcf7_contact_form_tag_func()
    #10 [internal function]: do_shortcode_tag()
    #11 /home/XXX/public_html/wp-includes/shortcodes.php(273): preg_replace_callback()
    #12 /home/XXX/public_html/wp-content/plugins/liquid-wpbakery/include/helpers/helpers.php(246): do_shortcode()
    #13 /home/XXX/public_html/wp-content/plugins/liquid-wpbakery/include/templates/shortcodes/vc_column_text.php(31): wpb_js_remove_wpautop()
    #14 /home/XXX/public_html/wp-content/plugins/liquid-wpbakery/include/classes/shortcodes/core/class-wpbakeryshortcode.php(271): require('/home/X...')
    #15 /home/XXX/public_html/wp-content/plugins/liquid-wpbakery/include/classes/shortcodes/core/class-wpbakeryshortcode.php(244): WPBakeryShortCode->loadTemplate()
    #16 /home/XXX/public_html/wp-content/plugins/liquid-wpbakery/include/classes/shortcodes/core/class-wpbakeryshortcode.php(366): WPBakeryShortCode->content()
    #17 /home/XXX/public_html/wp-content/plugins/liquid-wpbakery/include/helpers/helpers.php(1309): WPBakeryShortCode->output()
    #18 /home/XXX/public_html/wp-includes/shortcodes.php(434): vc_do_shortcode()
    #19 [internal function]: do_shortcode_tag()
    #20 /home/XXX/public_html/wp-includes/shortcodes.php(273): preg_replace_callback()
    #21 /home/XXX/public_html/wp-content/plugins/liquid-wpbakery/include/helpers/helpers.php(246): do_shortcode()
    #22 /home/XXX/public_html/wp-content/themes/ave/templates/vc/vc_column_inner.php(333): wpb_js_remove_wpautop()
    #23 /home/XXX/public_html/wp-content/plugins/liquid-wpbakery/include/classes/shortcodes/core/class-wpbakeryshortcode.php(271): require('/home/X...')
    #24 /home/XXX/public_html/wp-content/plugins/liquid-wpbakery/include/classes/shortcodes/core/class-wpbakeryshortcode.php(244): WPBakeryShortCode->loadTemplate()
    #25 /home/XXX/public_html/wp-content/plugins/liquid-wpbakery/include/classes/shortcodes/core/class-wpbakeryshortcode.php(366): WPBakeryShortCode->content()
    #26 /home/XXX/public_html/wp-content/plugins/liquid-wpbakery/include/helpers/helpers.php(1309): WPBakeryShortCode->output()
    #27 /home/XXX/public_html/wp-includes/shortcodes.php(434): vc_do_shortcode()
    #28 [internal function]: do_shortcode_tag()
    #29 /home/XXX/public_html/wp-includes/shortcodes.php(273): preg_replace_callback()
    #30 /home/XXX/public_html/wp-content/plugins/liquid-wpbakery/include/helpers/helpers.php(246): do_shortcode()
    #31 /home/XXX/public_html/wp-content/themes/ave/templates/vc/vc_row_inner.php(212): wpb_js_remove_wpautop()
    #32 /home/XXX/public_html/wp-content/plugins/liquid-wpbakery/include/classes/shortcodes/core/class-wpbakeryshortcode.php(271): require('/home/X...')
    #33 /home/XXX/public_html/wp-content/plugins/liquid-wpbakery/include/classes/shortcodes/vc-row.php(40): WPBakeryShortCode->loadTemplate()
    #34 /home/XXX/public_html/wp-content/plugins/liquid-wpbakery/include/classes/shortcodes/core/class-wpbakeryshortcode.php(366): WPBakeryShortCode_Vc_Row->content()
    #35 /home/XXX/public_html/wp-content/plugins/liquid-wpbakery/include/helpers/helpers.php(1309): WPBakeryShortCode->output()
    #36 /home/XXX/public_html/wp-includes/shortcodes.php(434): vc_do_shortcode()
    #37 [internal function]: do_shortcode_tag()
    #38 /home/XXX/public_html/wp-includes/shortcodes.php(273): preg_replace_callback()
    #39 /home/XXX/public_html/wp-content/plugins/liquid-wpbakery/include/helpers/helpers.php(246): do_shortcode()
    #40 /home/XXX/public_html/wp-content/themes/ave/templates/vc/vc_column.php(418): wpb_js_remove_wpautop()
    #41 /home/XXX/public_html/wp-content/plugins/liquid-wpbakery/include/classes/shortcodes/core/class-wpbakeryshortcode.php(271): require('/home/X...')
    #42 /home/XXX/public_html/wp-content/plugins/liquid-wpbakery/include/classes/shortcodes/core/class-wpbakeryshortcode.php(244): WPBakeryShortCode->loadTemplate()
    #43 /home/XXX/public_html/wp-content/plugins/liquid-wpbakery/include/classes/shortcodes/core/class-wpbakeryshortcode.php(366): WPBakeryShortCode->content()
    #44 /home/XXX/public_html/wp-content/plugins/liquid-wpbakery/include/helpers/helpers.php(1309): WPBakeryShortCode->output()
    #45 /home/XXX/public_html/wp-includes/shortcodes.php(434): vc_do_shortcode()
    #46 [internal function]: do_shortcode_tag()
    #47 /home/XXX/public_html/wp-includes/shortcodes.php(273): preg_replace_callback()
    #48 /home/XXX/public_html/wp-content/plugins/liquid-wpbakery/include/helpers/helpers.php(246): do_shortcode()
    #49 /home/XXX/public_html/wp-content/themes/ave/templates/vc/vc_row.php(440): wpb_js_remove_wpautop()
    #50 /home/XXX/public_html/wp-content/plugins/liquid-wpbakery/include/classes/shortcodes/core/class-wpbakeryshortcode.php(271): require('/home/X...')
    #51 /home/XXX/public_html/wp-content/plugins/liquid-wpbakery/include/classes/shortcodes/vc-row.php(40): WPBakeryShortCode->loadTemplate()
    #52 /home/XXX/public_html/wp-content/plugins/liquid-wpbakery/include/classes/shortcodes/core/class-wpbakeryshortcode.php(366): WPBakeryShortCode_Vc_Row->content()
    #53 /home/XXX/public_html/wp-content/plugins/liquid-wpbakery/include/helpers/helpers.php(1309): WPBakeryShortCode->output()
    #54 /home/XXX/public_html/wp-includes/shortcodes.php(434): vc_do_shortcode()
    #55 [internal function]: do_shortcode_tag()
    #56 /home/XXX/public_html/wp-includes/shortcodes.php(273): preg_replace_callback()
    #57 /home/XXX/public_html/wp-includes/class-wp-hook.php(324): do_shortcode()
    #58 /home/XXX/public_html/wp-includes/plugin.php(205): WP_Hook->apply_filters()
    #59 /home/XXX/public_html/wp-includes/post-template.php(256): apply_filters()
    #60 /home/XXX/public_html/wp-content/themes/ave/templates/content/page.php(13): the_content()
    #61 /home/XXX/public_html/wp-content/themes/ave/liquid/liquid-template-tags.php(105): include('/home/X...')
    #62 /home/XXX/public_html/wp-content/themes/ave/page.php(12): liquid_get_content_template()
    #63 /home/XXX/public_html/wp-includes/template-loader.php(106): include('/home/X...')
    #64 /home/XXX/public_html/wp-blog-header.php(19): require_once('/home/X...')
    #65 /home/XXX/public_html/index.php(17): require('/home/X...')
    #66 {main}
    thrown in
    </pre>
Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Takayuki Miyoshi

    (@takayukister)

    Where can we see the website in question?

    Thread Starter oasiswork07

    (@oasiswork07)

    Thank you for taking out time Takayuki Sir.
    As the website is live I have enabled debugging on a test page.
    Please let me know if any other detail is required.

    Thanking you in anticipation.

    Thread Starter oasiswork07

    (@oasiswork07)

    Sir, I have created a page with just the shortcode in the content and have disabled everything else(header, footer); then also error is getting generated.

    Everything was working fine earlier, this is happening only after upgrading to PHP 8.1

    Plugin Author Takayuki Miyoshi

    (@takayukister)

    What other plugins and theme do you use on the site?

    Thread Starter oasiswork07

    (@oasiswork07)

    The list of plugins & theme installed is as follows Sir:


    PLUGINS
    Ave Core - 1.5.2
    Ave Portfolio - 1.0
    Ave TypeKit - 1.0
    Contact Form 7 - 6.0.5
    Contact Form CFDB7 - 1.3.0
    Disable Gutenberg - 3.2.3
    Duplicate Page - 4.5.4
    Liquid Events - 1.0.1
    Liquid WPBakery Page Builder - 7.2
    Listo - 1.9
    Slider Revolution - 6.5.6
    Sucuri Security - 1.9.9
    Ultimate Addons for WPBakery Page Builder - 3.19.11
    Wordfence Security - 8.0.4
    Yoast SEO - 24.8.1

    THEME
    Ave by Liquid Theme - 2.8.10
    But it's child theme is activated

    NOTE: I also created a standalone page & similar error got generated there too.
    This might help you with sharing a resolution.

    Plugin Author Takayuki Miyoshi

    (@takayukister)

    Try switching to the default theme, deactivating all plugins excluding Contact Form 7, Listo, Wordfence Security and Yoast SEO, and clearing all cache data.

    Why you are advised to deactivate plugins and switch to the default theme.

    Thread Starter oasiswork07

    (@oasiswork07)

    Hello Sir,
    I created a demo domain for testing it like you have mentioned.
    After JUST changing the theme to ‘2025’ the form started loading on the test & temp page too.

    Can you please share an insight about what could be causing this issue in the previous theme?

    Thanking you in anticipation.

    Thread Starter oasiswork07

    (@oasiswork07)

    Hello Sir,
    I figured out the issue, it was caused by a line of code in the child theme’s functions.php i.e.
    add_filter(‘wpcf7_autop_or_not’, false)

    What can be used as a substitute for this? Any ideas would help.

    Thank you.

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Fatal error: Uncaught TypeError: call_user_func_array()’ is closed to new replies.