Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on WordPress.org (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

GeneratePress theme not compatible with any PHP 8 versions

  • Hi,

    Our website host tried updating the php version and when they did they got a fatal error and said generatepress was not compatible with any php 8 version. They asked us to inform you of the following error:

    Fatal error: Uncaught TypeError: call_user_func_array(): Argument #1 ($callback) must be a valid callback, non-static method next_article_layout_class_grid::next_print_script_in_header() cannot be called statically in /home/nginx/domains/WEBSITENAME.com/public/wp-includes/class-wp-hook.php:324 Stack trace: #0 /home/nginx/domains/WEBSITENAME.com/public/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() #1 /home/nginx/domains/WEBSITENAME.com/public/wp-includes/plugin.php(517): WP_Hook->do_action() #2 /home/nginx/domains/WEBSITENAME.com/public/wp-includes/general-template.php(3064): do_action() #3 /home/nginx/domains/WEBSITENAME.com/public/wp-content/themes/generatepress/header.php(16): wp_head() #4 /home/nginx/domains/WEBSITENAME.com/public/wp-includes/template.php(810): require_once(‘…’) #5 /home/nginx/domains/WEBSITENAME.com/public/wp-includes/template.php(745): load_template() #6 /home/nginx/domains/WEBSITENAME.com/public/wp-includes/general-template.php(48): locate_template() #7 /home/nginx/domains/WEBSITENAME.com/public/wp-content/themes/generatepress/page.php(17): get_header() #8 /home/nginx/domains/WEBSITENAME.com/public/wp-includes/template-loader.php(106): include(‘…’) #9 /home/nginx/domains/WEBSITENAME.com/public/wp-blog-header.php(19): require_once(‘…’) #10 /home/nginx/domains/WEBSITENAME.com/public/index.php(17): require(‘…’) #11 {main} thrown in /home/nginx/domains/WEBSITENAME.com/public/wp-includes/class-wp-hook.php on line 324

  • Hi there,

    GP is certainly compatible with PHP 8, my sites are using PHP 8.2.10 without any issue.

    The error log looks like it is mostly related to the plugins adding functions to the WordPress hook, and PHP 8 is stricter about how functions are called.

    And the mentioned functions in the error logs are not from GP.

    Can you try disabling all plugins before updating to PHP 8?

  • Thanks for your response. It was indeed an old plugin.

  • You are welcome   🙂

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.