• Resolved ttoaster

    (@ttoaster)


    Hi,

    Just updated to 8.02 and my site threw a Critical Error, see details below:

    WordPress version 6.9.1
    Active theme: Vogue (version 10.9.3)
    Current plugin: Site Reviews (version 8.0.2)
    PHP version 8.3.25

    Error Details
    =============
    An error of type E_ERROR was caused in line 75 of the file /var/www/492e758c-f53e-4c95-a3c7-e6fe67eb1275/public_html/wp-content/plugins/site-reviews/plugin/Controllers/Api/Version1/Parameters/SummaryParameters.php. Error message: Uncaught Error: Call to undefined method GeminiLabs\SiteReviews\Modules\Rating::max() in /var/www/492e758c-f53e-4c95-a3c7-e6fe67eb1275/public_html/wp-content/plugins/site-reviews/plugin/Controllers/Api/Version1/Parameters/SummaryParameters.php:75
    Stack trace:
    #0 /var/www/492e758c-f53e-4c95-a3c7-e6fe67eb1275/public_html/wp-content/plugins/site-reviews/plugin/Controllers/Api/Version1/RestSummaryController.php(23): GeminiLabs\SiteReviews\Controllers\Api\Version1\Parameters\SummaryParameters->parameters()
    #1 /var/www/492e758c-f53e-4c95-a3c7-e6fe67eb1275/public_html/wp-content/plugins/site-reviews/plugin/Controllers/Api/Version1/RestSummaryController.php(93): GeminiLabs\SiteReviews\Controllers\Api\Version1\RestSummaryController->get_collection_params()
    #2 /var/www/492e758c-f53e-4c95-a3c7-e6fe67eb1275/public_html/wp-content/plugins/site-reviews/plugin/Controllers/Api/Version1/RestController.php(17): GeminiLabs\SiteReviews\Controllers\Api\Version1\RestSummaryController->register_routes()
    #3 [internal function]: GeminiLabs\SiteReviews\Controllers\Api\Version1\RestController->registerRoutes(Object(WP_REST_Server))
    #4 /var/www/492e758c-f53e-4c95-a3c7-e6fe67eb1275/public_html/wp-content/plugins/site-reviews/plugin/HookProxy.php(24): call_user_func_array(Array, Array)
    #5 /var/www/492e758c-f53e-4c95-a3c7-e6fe67eb1275/public_html/wp-includes/class-wp-hook.php(341): GeminiLabs\SiteReviews\Controllers\Api\Version1\RestController::GeminiLabs\SiteReviews\{closure}(Object(WP_REST_Server))
    #6 /var/www/492e758c-f53e-4c95-a3c7-e6fe67eb1275/public_html/wp-includes/class-wp-hook.php(365): WP_Hook->apply_filters(NULL, Array)
    #7 /var/www/492e758c-f53e-4c95-a3c7-e6fe67eb1275/public_html/wp-includes/plugin.php(522): WP_Hook->do_action(Array)
    #8 /var/www/492e758c-f53e-4c95-a3c7-e6fe67eb1275/public_html/wp-includes/rest-api.php(636): do_action('rest_api_init', Object(WP_REST_Server))
    #9 /var/www/492e758c-f53e-4c95-a3c7-e6fe67eb1275/public_html/wp-includes/rest-api.php(594): rest_get_server()
    #10 /var/www/492e758c-f53e-4c95-a3c7-e6fe67eb1275/public_html/wp-includes/rest-api.php(2981): rest_do_request(Object(WP_REST_Request))
    #11 [internal function]: rest_preload_api_request(Array, '/jetpack/v4/con...')
    #12 /var/www/492e758c-f53e-4c95-a3c7-e6fe67eb1275/public_html/wp-content/plugins/woocommerce/src/Internal/Admin/Settings.php(148): array_reduce(Array, 'rest_preload_ap...')
    #13 /var/www/492e758c-f53e-4c95-a3c7-e6fe67eb1275/public_html/wp-includes/class-wp-hook.php(341): Automattic\WooCommerce\Internal\Admin\Settings->add_component_settings(Array)
    #14 /var/www/492e758c-f53e-4c95-a3c7-e6fe67eb1275/public_html/wp-includes/plugin.php(205): WP_Hook->apply_filters(Array, Array)
    #15 /var/www/492e758c-f53e-4c95-a3c7-e6fe67eb1275/public_html/wp-content/plugins/woocommerce/src/Internal/Admin/WCAdminSharedSettings.php(73): apply_filters('woocommerce_adm...', Array)
    #16 /var/www/492e758c-f53e-4c95-a3c7-e6fe67eb1275/public_html/wp-content/plugins/woocommerce/src/Blocks/Assets/AssetDataRegistry.php(274): Automattic\WooCommerce\Internal\Admin\WCAdminSharedSettings->Automattic\WooCommerce\Internal\Admin\{closure}()
    #17 /var/www/492e758c-f53e-4c95-a3c7-e6fe67eb1275/public_html/wp-content/plugins/woocommerce/src/Blocks/Assets/AssetDataRegistry.php(390): Automattic\WooCommerce\Blocks\Assets\AssetDataRegistry->execute_lazy_data()
    #18 /var/www/492e758c-f53e-4c95-a3c7-e6fe67eb1275/public_html/wp-includes/class-wp-hook.php(341): Automattic\WooCommerce\Blocks\Assets\AssetDataRegistry->enqueue_asset_data('')
    #19 /var/www/492e758c-f53e-4c95-a3c7-e6fe67eb1275/public_html/wp-includes/class-wp-hook.php(365): WP_Hook->apply_filters(NULL, Array)
    #20 /var/www/492e758c-f53e-4c95-a3c7-e6fe67eb1275/public_html/wp-includes/plugin.php(522): WP_Hook->do_action(Array)
    #21 /var/www/492e758c-f53e-4c95-a3c7-e6fe67eb1275/public_html/wp-admin/includes/template.php(2226): do_action('admin_print_foo...')
    #22 /var/www/492e758c-f53e-4c95-a3c7-e6fe67eb1275/public_html/wp-admin/update.php(53): iframe_footer()
    #23 {main}
      thrown

    Can you please investigate and fix?

    I have currently downgraded back to 8.01

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Paul

    (@pryley)

    @ttoaster Is it possible that the 8.0.2 update was interrupted?

    Because that specific error doesn’t make sense unless files are missing in the plugin:

    Error: Call to undefined method GeminiLabs\SiteReviews\Modules\Rating::max()

    See: https://github.com/pryley/site-reviews/blob/90e18df81f67ea6f5b3c51996d37242229972595/plugin/Modules/Rating.php#L100-L103

    Can you try updating again and see if it works the second time around?

    Thread Starter ttoaster

    (@ttoaster)

    Hmmm… no interruptions on my server…

    Tried to update it again, and it seemed to work without throwing any error messages this time.

    Plugin Contributor Paul

    (@pryley)

    WordPress executed Site Reviews code during the update process while files were in a transitional state—SummaryParameters.php (from v8, calling max()) loaded before Rating.php (still v7, lacking max()).

    This race condition was triggered by WooCommerce preloading REST API data in the update iframe footer, initializing REST routes prematurely. It affected Site Reviews because it integrates with WooCommerce using the REST API routes.

    Issues like this can happen in bulk updates, but resolves post-update.

    I will look into a fix to prevent the WooCommerce REST API preloading from affecting Site Reviews.

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

You must be logged in to reply to this topic.