• Resolved schwindt14

    (@schwindt14)


    Today I updated plugins and now when I try to edit/delete/create posts, I get a “critical site error”.

    I will paste the log information below, but I wanted to add that if I disable reverse proxy via Varnish in W3TC settings, the problem goes away.

    I have been using these Varnish settings successfully for months so I don’t think it is a problem with the Varnish IP address I am using, since it suddenly began after updates today.

    Here is the error log information:

    [13-Jan-2023 14:29:27 UTC] PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function W3TC\Varnish_Plugin::varnish_flush_post(), 1 passed in /home/818752.cloudwaysapps.com/teyxrjftqb/public_html/wp-includes/class-wp-hook.php on line 308 and exactly 2 expected in /home/818752.cloudwaysapps.com/teyxrjftqb/public_html/wp-content/plugins/w3-total-cache/Varnish_Plugin.php:57
    Stack trace: 0 /home/818752.cloudwaysapps.com/teyxrjftqb/public_html/wp-includes/class-wp-hook.php(308): W3TC\Varnish_Plugin->varnish_flush_post() 1 /home/818752.cloudwaysapps.com/teyxrjftqb/public_html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters() 2 /home/818752.cloudwaysapps.com/teyxrjftqb/public_html/wp-includes/plugin.php(517): WP_Hook->do_action() 3 /home/818752.cloudwaysapps.com/teyxrjftqb/public_html/wp-content/themes/Divi/core/components/init.php(88): do_action() 4 /home/818752.cloudwaysapps.com/teyxrjftqb/public_html/wp-content/themes/Divi/core/components/PageResource.php(981): et_core_clear_wp_cache() 5 /home/818752.cloudwaysapps.com/teyxrjftqb/public_html/wp-content/themes/Divi/core/components/PageResource.php(921): ET_Core_PageResource::do_remove_static_resources() 6 /home/818752.cloudwaysapps.com/teyxrjftqb/public_html/wp-content/themes/Divi/core/components/PageResource.php(893): ET_Core_PageResource::remove_static_resources() 7 /home/818752.cloudwaysapps.com/teyxrjftqb/public_html/wp-includes/class-wp-hook.php(308): ET_Core_PageResource::save_post_cb() 8 /home/818752.cloudwaysapps.com/teyxrjftqb/public_html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters() 9 /home/818752.cloudwaysapps.com/teyxrjftqb/public_html/wp-includes/plugin.php(517): WP_Hook->do_action() 10 /home/818752.cloudwaysapps.com/teyxrjftqb/public_html/wp-includes/post.php(4717): do_action() 11 /home/818752.cloudwaysapps.com/teyxrjftqb/public_html/wp-includes/revision.php(337): wp_insert_post() 12 /home/818752.cloudwaysapps.com/teyxrjftqb/public_html/wp-includes/revision.php(191): _wp_put_post_revision() 13 /home/818752.cloudwaysapps.com/teyxrjftqb/public_h in /home/818752.cloudwaysapps.com/teyxrjftqb/public_html/wp-content/plugins/w3-total-cache/Varnish_Plugin.php on line 57
Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @schwindt14

    I am sorry about the issue you are experiencing and I am happy to assist you with this

    We are looking into this and trying to replicate the problem. I’ll get back to you once I have more information.

    Thank you for your patience.

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @schwindt14

    Can you please try a quick “fix” and update /wp-content/plugins/w3-total-cache/Varnish_Plugin.php line 57 to:

    public function varnish_flush_post( $post_id, $force = false ) {

    Let me know if this helps!

    Thanks!

    Thread Starter schwindt14

    (@schwindt14)

    That fix seems to have taken care of the issue. Thank you for your quick assistance!

    Will I need to add that line again in the future after updates or am I all set going forward?

    public function varnish_flush_post( $post_id, $force = false ) {

    this seems to have done the trick for me too

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @schwindt14 @cantoute

    I am glad to know this helps!
    This will be fixed in the next update so you can leave as it is for now.
    Thanks!

    Thread Starter schwindt14

    (@schwindt14)

    Excellent. I have marked this as resolved.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Critical / Fatal Error with Varnish After Update’ is closed to new replies.