• Resolved fuchsws

    (@fuchsws)


    When WP Statistics (Version 14.9.3) is enabled, media file upload result in an error “can not process file”, however the file will be uploaded.

    When deleting media files the following error occurs:

    PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function WP_Statistics\Service\Admin\Posts\PostsManager::addWordsCountCallback(), 2 passed in /htdocs/wp-includes/class-wp-hook.php on line 324 and exactly 3 expected in /htdocs/wp-content/plugins/wp-statistics/src/Service/Admin/Posts/PostsManager.php:27
    Stack trace: 0 /htdocs/wp-includes/class-wp-hook.php(324): WP_Statistics\Service\Admin\Posts\PostsManager->addWordsCountCallback() 1 /htdocs/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() 2 /htdocs/wp-includes/plugin.php(517): WP_Hook->do_action() 3 /htdocs/wp-content/mu-plugins/dna-save-attachment.php(26): do_action() 4 /htdocs/wp-includes/class-wp-hook.php(324): dna\save_attachment\do_save_post() 5 /htdocs/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() 6 /htdocs/wp-includes/plugin.php(517): WP_Hook->do_action() 7 /htdocs/wp-includes/post.php(4791): do_action() 8 /htdocs/wp-includes/post.php(6358): wp_insert_post() 9 /htdocs/wp-includes/post.php(4976): wp_insert_attachment() 10 /htdocs/wp-includes/post.php(3765): wp_update_post() 11 /htdocs/wp-admin/post.php(260): wp_trash_post() 12 {main}

    thrown in /htdocs/wp-content/plugins/wp-statistics/src/Service/Admin/Posts/PostsManager.php on line 27

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Mostafa Soufi

    (@mostafas1990)

    Hello,

    Thank you for reporting this issue. It’s unusual because the save_post action in WordPress usually uses three arguments, but your setup only has two. Another plugin might be causing this.

    To fix this, we’ve added compatibility in the development version, which will be included in the next release.

    You can see the changes here: GitHub Commit.

    Best

    Thread Starter fuchsws

    (@fuchsws)

    Thanks that fixed it!

    Plugin Author Mostafa Soufi

    (@mostafas1990)

    Amazing, thank you

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.