• Resolved sboyertcm

    (@sboyertcm)


    Hello,
    When I have ShortPixel Critical CSS and WP Rocket activate both at the same tume, I have this error. I only have this when ShortPixel Critical CSS is activated. I use PHP 8.2.

    Deprecated: Function rocket_clean_wpengine() is deprecated since version 3.6.1! Use \WP_Rocket\ThirdParty\Hostings\WPEngine::clean_wpengine instead. in /var/www/html/wp-includes/functions.php on line 5405

    Fatal error: Uncaught TypeError: call_user_func_array(): Argument #1 ($callback) must be a valid callback, function “rocket_clean_supercacher” not found or invalid function name in /var/www/html/wp-includes/class-wp-hook.php:310 Stack trace: #0 /var/www/html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(NULL, Array) #1 /var/www/html/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #2 /var/www/html/wp-content/plugins/wp-rocket/inc/functions/files.php(866): do_action(‘after_rocket_cl…’, ‘/var/www/html/w…’, ”, ‘..’) #3 /var/www/html/wp-content/plugins/wp-rocket/inc/common/purge.php(459): rocket_clean_domain(”) #4 /var/www/html/wp-includes/class-wp-hook.php(308): do_admin_post_rocket_purge_cache(”) #5 /var/www/html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(”, Array) #6 /var/www/html/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #7 /var/www/html/wp-admin/admin-post.php(85): do_action(‘admin_post_purg…’) #8 {main} thrown in?/var/www/html/wp-includes/class-wp-hook.php?on line?310

    Do you have any clue ?

    Thanks

    • This topic was modified 1 year, 5 months ago by sboyertcm.
Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support Gerard Blanco

    (@sixaxis)

    Hi @sboyertcm!

    Have you asked the WP Rocket team already? I have a feeling they may be able to shed more light into this. Let us know what they say, please!

    Thank you,

    Thread Starter sboyertcm

    (@sboyertcm)

    Hi,

    Yes, I asked WP Rocket team. I will keep you update.

    Thanks

    Hello @sixaxis Piotr from WP Rocket here.

    It looks like you’re using deprecated function directly in your code, as per our developer:
    https://github.com/wp-media/wp-rocket/issues/5972#issuecomment-1658991491

    Please feel free to ask any question inside this issue if you need any help.

    Plugin Support Gerard Blanco

    (@sixaxis)

    Thanks Piotrek! I will forward this to our dev team.

    Plugin Author Pedro

    (@petredobrescu)

    Hello @boniu91 and @sboyertcm,

    Thanks for pointing this out. It looks like somehow the error is only triggered on WP Engine (they must have some integration with WP Rocket), and that’s probably the reason why we haven’t spotted this in our testing.

    Here’s a dev version that contains the necessary fix for this issue:

    https://shortpixel.com/downloads/shortpixel-critical-css-1.0.1-DEV01.zip

    We’d really appreciate if you could test this version on a staging/dev version of your site. If everything works well, we’ll include the fix in the next release of our plugin.

    Thanks!

    Hey there! Alfonso from WP Rocket support team here.
    I tested the dev version and I am still getting an error, It happens when you try to save the CDN option in WP Rocket:

    Fatal error: Uncaught TypeError: call_user_func_array(): Argument #1 ($callback) must be a valid callback, non-static method WP_Rocket\ThirdParty\Hostings\WPEngine::clean_wpengine() cannot be called statically in /public_html/wp-includes/class-wp-hook.php:312 Stack trace: #0 /public_html/wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters(NULL, Array) #1 /public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #2 /public_html/wp-content/plugins/wp-rocket/inc/functions/files.php(860): do_action('after_rocket_cl…', '/home/…', '', 'https://wphanga…') #3 /public_html/wp-content/plugins/wp-rocket/inc/admin/options.php(94): rocket_clean_domain() #4 /public_html/wp-includes/class-wp-hook.php(312): rocket_after_save_options(Array, Array) #5 /public_html/wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters(NULL, Array) #6 /public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #7 /public_html/wp-includes/option.php(581): do_action('update_option_w…', Array, Array, 'wp_rocket_setti…') #8 /public_html/wp-admin/options.php(322): update_option('wp_rocket_setti…', Array) #9 {main} thrown in /public_html/wp-includes/class-wp-hook.php on line 312

    Plugin Author Pedro

    (@petredobrescu)

    Dear @alfonso100, @boniu91,

    Thanks for the error report, here’s another attempt (we’re doing this pretty blind since we’re not having access to a WP Engine site to fully test this with WP Rocket):

    https://shortpixel.com/downloads/shortpixel-critical-css-1.0.1-DEV02.zip

    Please tell us if this one works as expected and we’ll surely release a new version with this fix.

    Thank you!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Error with WP Rocket’ is closed to new replies.