• Resolved rfmf

    (@rfmf)


    Hello,

    so, i searched for a solution (e.g. increased memory) but could not find anything that worked unfortunately.
    My WordPress 6.1.1 + Elementor page works good with PHP 7.4 (no errors in log) but causes an WSOD Error 500 as soon as i switch to PHP 8.0 or higher. I deactivated ALL plugins and used the twenty-twenty-three theme. Also cleared/deleted old tables with a plugin. WP and plugins are up to date. I put define(‘WP_MEMORY_LIMIT’, ‘256M’); in my wp-config as well. Error Log gives me one line :

    “PHP Warning: call_user_func_array() expects parameter 1 to be a valid callback, function ‘wpb_hook_javascript’ not found or invalid function name in “[…]/wp-includes/class-wp-hook.php on line 308”

    Line 308 says:
    $value = call_user_func_array( $the_[‘function’], $args );

    Since i deactivated everything i have no idea what to do. It seems like an internal WordPress problem with PHP 8, like some code that became invalid with the new version? Also wpb_hook_javascript seems quite generic, so i cant deduce who calls it. I am not a programmer though.

    Maybe someone can tell me what to look for. Thank you!

Viewing 4 replies - 1 through 4 (of 4 total)
  • wpb_hook_javascript is not a feature of WordPress. It must come from a plugin or theme. Since you already disabled the plugins, did you ever change the theme? If it works after a theme change, the theme you used before is to blame for the error.

    Call back functions in php are used to name a function that will be called when an event takes place. Twenty twenty three themes is a new animal because it doesn’t include any default php files. There is no functions.php or index.php in this theme. If you are running a older version of wordpress this theme might not work. The index.php was removed as a required file in version 6.0.

    If you added a functions.php file I would start looking there. Also, look in your php error log to see if it display any additional information. If you disabled all plugins, I can’t really think of any where else to look. If you copied your functions.php file into the theme try removing it. Other than plugins and the functions.php files. This theme only uses the wordpress core files.

    • This reply was modified 1 year, 9 months ago by mrtom414.
    Thread Starter rfmf

    (@rfmf)

    Thank you for your suggestions, i appreciate it! I’m really busy right now, so I will look into it at the beginning of next week and report back.
    @mrtom414 I really just used the WordPress theme in this current case and never before. It was installed unused. I started with Hello Elementor (child) and stuck to it, since then.

    Thread Starter rfmf

    (@rfmf)

    As @mrtom414 suggested it was the functions.php of my child theme. I found an old function i added some years ago to test something and forgot about… Thank you for your time!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘PHP 8 causes Error 500 with call_user_func_array() and wpb_hook_javascript’ is closed to new replies.