Site logo

[Resolved] PHP 8.0 Compatibility Problem?

Home Forums Support [Resolved] PHP 8.0 Compatibility Problem?

Home Forums Support PHP 8.0 Compatibility Problem?

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #2277034
    Norman

    I am submitting a new topic after seeing my basic problem in another post here:
    https://generatepress.com/forums/topic/php-8-compatibility/#post-2276959

    I’m wondering if Generate Press is compatible with PHP 8.0? I just tried to update and an error and critical site error similar to what is on this page:

    https://wordpress.org/support/topic/too-few-arguments-to-function-wp_widget__construct/

    I just updated yesterday to WordPress 6.0 so maybe that wasn’t actually a good move.

    I quickly downgraded from 8.0 to 7.4 again, and the site came back.

    Note: I do have a Plugin called Featured Posts and “perhaps” this error is because of that?

    Note: I have placed the word “USER” where the user directory name goes. I’m not sure if that matters, but thought I would anyway.

    Here is the error from the error log provided to me by host at LiquidWeb

    So here's what error log says about that error:
    PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function WP_Widget::__construct(), 0 passed in /home/USER/public_html/wp-includes/class-wp-widget-factory.php on line 61 and at least 2 expected in /home/USER/public_html/wp-includes/class-wp-widget.php:162 
    Aninda (7/7/2022, 6:02:01 PM): And here's the Stack trace:
    #0 /home/USER/public_html/wp-includes/class-wp-widget-factory.php(61): WP_Widget->__construct()
    #1 /home/USER/public_html/wp-includes/widgets.php(115): WP_Widget_Factory->register('featured_posts_...')
    #2 /home/USER/public_html/wp-content/plugins/featured-posts-widget/featured-posts-widget.php(226): register_widget('featured_posts_...')
    #3 /home/USER/public_html/wp-includes/class-wp-hook.php(307): featured_posts_widget_load_widgets('')
    #4 /home/USER/public_html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array)
    #5 /home/USER/public_html/wp-includes/plugin.php(476): WP_Hook->do_action(Array)
    #6 /home/USER/public_html/wp-includes/widgets.php(1854): do_action('widgets_init')
    #7 /home/USER/public_html/wp-includes/class-wp-hook.php(307): wp_widgets_init('')
    #8 /home/USER/public_html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array)
    #9 /home/USER/public_html/wp-includes/plugin.php(476): WP_Hook->do_action(Array)
    #10 /home/USER/public_html/wp-settings.php(598): do_action('init')
    #11 /home/USER/public_html/wp-config.php(109): require_once('/home/USER/p...')
    #12 /home/USER/public_html/wp-load.php(50): require_once('/home/USER/p...')
    #13 /home/USER/public_html/wp-admin/admin-ajax.php(22): require_once('/home/USER/p...')
    #14 {main}
      thrown in /home/USER/public_html/wp-includes/class-wp-widget.php on line 162 

    Thank you,
    Norm

    #2277084
    David
    Staff
    Customer Support

    Hi there,

    do you have a Related Posts widget in your widget areas ? ( Sidebar, footers or elsewhere )

    #2277090
    Norman

    Hello David,

    Yes, but it’s called Featured Posts in the right sidebar widget area – https://www.screencast.com/t/QTSqFtyG83N

    Norm

    #2277091
    Norman

    07.08.2022-09.00.43

    #2277093
    David
    Staff
    Customer Support

    That looks like the culprit, if you look in your error stack trace you will see the plugin is named here:

    /home/USER/public_html/wp-content/plugins/featured-posts-widget/featured-posts-widget.php(226)

    You will need to remove that plugin if you want to go to PHP 8

    #2277098
    Norman

    I’m just noticing how outdated this plugin actually is. I’ve used it for many years as it does exactly what I want, but if it’s causing the issue, I will probably remove that and try again.

    Thank you!
    Norm

    #2277101
    David
    Staff
    Customer Support

    You’re welcome

    #2277688
    Scott

    I use php 8.1.0 FPM/FastCGI on multiple sites with GP with no issues.

    #2277716
    Norman

    Thanks. It seems my primary membership plug-in may not be ready yet.

    #2278088
    Leo
    Staff
    Customer Support

    Glad to hear that you found the cause.

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