• Resolved TheFactory

    (@thefactory)


    Fatal error: Uncaught ArgumentCountError: Too few arguments to function W3TC\Cdn_Plugin::check_inserting_new_attachment(), 1 passed in /home/mysite/public_html/wp-includes/class-wp-hook.php on line 288 and exactly 2 expected in /home/mysite/public_html/wp-content/plugins/w3-total-cache/Cdn_Plugin.php:156

    Please let me know if there is a fix available?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello,
    Thank you for bringing this to our attention.
    We’ve made some tests and indeed there is a bug and we’ll release a fix soon.
    What happens is:
    In wp-content/plugins/w3-total-cache/Cdn_Plugin.php on line 74 there is this:

    add_filter( 'wp_insert_attachment_data',
          array( $this, 'check_inserting_new_attachment' ) );

    It should be this:

    add_filter( 'wp_insert_attachment_data',
          array( $this, 'check_inserting_new_attachment' ), 10, 2 );

    This is a workaround until the fix is released.

    Thanks that worked it took me a while to work out the cause of the error.
    Is it possible to post information like this into the dashboard ?? of wordpress

    Thanks for saving my ass on fire!

    mtran003

    (@mtran003)

    I beleive there may still be an issue. I am using W3 Total Cache 0.9.7.5 and I checked the code for Cdn_Plugin.php and it has the correct code as shown above.

    Yet, with CDN enabled (AWS CloudFront origin pull with HTTPS) I get “HTTP Error” when trying to uplaod new media images.

    When I disabled CDN I was able to upload successfully.

    • This reply was modified 7 years ago by mtran003.
Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Error after upgrade’ is closed to new replies.