• Resolved Winston

    (@anarchoi)


    The widget suddenly stopped working on one of my WP sites. In the dev console, I can see that this URL is returning a 500 error:
    /wp-json/wordpress-popular-posts/v1/popular-posts/widget/2?is_single=28365

    When opening the URL in my browser, I see the default WP error “a fatal error occurred on this site”

    In the logs, I see this:

    AH01071: Got error 'PHP message: PHP Fatal error: Uncaught TypeError: Argument 1 passed to WordPressPopularPosts\Themer::get_theme() must be of the type string, array given, called in /var/www/vhosts/x.com.br/httpdocs/wp-content/plugins/wordpress-popular-posts/src/Output.php on line 187 and defined in /var/www/vhosts/x.com.br/httpdocs/wp-content/plugins/wordpress-popular-posts/src/Themer.php:129\nStack trace:\n#0 /var/www/vhosts/x.com.br/httpdocs/wp-content/plugins/wordpress-popular-posts/src/Output.php(187): WordPressPopularPosts\Themer->get_theme()\n#1 /var/www/vhosts/x.com.br/httpdocs/wp-content/plugins/wordpress-popular-posts/src/Rest/WidgetEndpoint.php(121): WordPressPopularPosts\Output->build_output()\n#2 /var/www/vhosts/x.com.br/httpdocs/wp-content/plugins/wordpress-popular-posts/src/Rest/WidgetEndpoint.php(80): WordPressPopularPosts\Rest\WidgetEndpoint->prepare_widget_item_for_response()\n#3 /var/www/vhosts/x.com.b…'

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Hector Cabrera

    (@hcabrera)

    Hi @anarchoi,

    This has been reported a couple of times but unfortunately I haven’t been able to reproduce it.

    Other users have said that deleting the widget from their sidebars and adding it back afterwards has fixed this issue for them so might want to give that a try and then please let me know how that went.

    Edit: also make sure that you’re running the latest version of the plugin on these sites.

    Plugin Author Hector Cabrera

    (@hcabrera)

    Hey there,

    It’s been over a week and haven’t heard back so I’ll assume that the proposed solution worked and so I’m marking this topic as resolved.

    If you still need assistance with this please feel free to leave a comment below.

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

The topic ‘Fatal Error, get_theme() must be of the type string, array given’ is closed to new replies.