Images fail to move to S3 using v3.2.0+
-
We have been using the WP Offload Media Lite plugin for a decade now, pretty much since its inception. We use it on upwards of 100 sites. After the release of 3.2.0 – some sites (not all) will no longer move media to their S3 bucket after upload. All sites are on similar servers, using similar plugins and similar custom themes. There is no real rhyme or reason to why some sites still work and others do not. I’m hoping someone here has an idea.
I created a test site from a copy of one of our live sites that no longer worked. I enabled debugging on it and I am finding that a DeliciousBrains function is not receiving enough arguments and is failing. I am assuming this to be the reason for the plugin’s failure to move images to S3 but I am unable to determine why the function is not getting the necessary arguments. Here is a copy of the debug log. The function fails a total of 6 times from 1 image upload.
[30-Mar-2023 14:54:24 UTC] PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function DeliciousBrains\WP_Offload_Media\Integrations\Media_Library::DeliciousBrains\WP_Offload_Media\Integrations\{closure}(), 4 passed in ***SITE_DIRECTORY***/wp-includes/class-wp-hook.php on line 287 and exactly 5 expected in ***SITE_DIRECTORY***/wp-content/plugins/amazon-s3-and-cloudfront/classes/integrations/media-library.php:159 Stack trace: #0 ***SITE_DIRECTORY***/wp-includes/class-wp-hook.php(287): DeliciousBrains\WP_Offload_Media\Integrations\Media_Library->DeliciousBrains\WP_Offload_Media\Integrations\{closure}(NULL, 24, '_wp_attached_fi...', true) #1 ***SITE_DIRECTORY***/wp-includes/plugin.php(206): WP_Hook->apply_filters(NULL, Array) #2 ***SITE_DIRECTORY***/wp-includes/meta.php(514): apply_filters('get_post_metada...', NULL, 24, '_wp_attached_fi...', true) #3 ***SITE_DIRECTORY***/wp-includes/post.php(2215): get_metadata('post', 24, '_wp_attached_fi...', true) #4 ***SITE_DIRECTORY***/wp-includes/post.php(499): get_post_meta(24, in ***SITE_DIRECTORY***/wp-content/plugins/amazon-s3-and-cloudfront/classes/integrations/media-library.php on line 159 [30-Mar-2023 14:54:24 UTC] PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function DeliciousBrains\WP_Offload_Media\Integrations\Media_Library::DeliciousBrains\WP_Offload_Media\Integrations\{closure}(), 4 passed in ***SITE_DIRECTORY***/wp-includes/class-wp-hook.php on line 287 and exactly 5 expected in ***SITE_DIRECTORY***/wp-content/plugins/amazon-s3-and-cloudfront/classes/integrations/media-library.php:159 Stack trace: #0 ***SITE_DIRECTORY***/wp-includes/class-wp-hook.php(287): DeliciousBrains\WP_Offload_Media\Integrations\Media_Library->DeliciousBrains\WP_Offload_Media\Integrations\{closure}(NULL, 24, '_wp_attached_fi...', true) #1 ***SITE_DIRECTORY***/wp-includes/plugin.php(206): WP_Hook->apply_filters(NULL, Array) #2 ***SITE_DIRECTORY***/wp-includes/meta.php(514): apply_filters('get_post_metada...', NULL, 24, '_wp_attached_fi...', true) #3 ***SITE_DIRECTORY***/wp-includes/post.php(2215): get_metadata('post', 24, '_wp_attached_fi...', true) #4 ***SITE_DIRECTORY***/wp-includes/post.php(499): get_post_meta(24, in ***SITE_DIRECTORY***/wp-content/plugins/amazon-s3-and-cloudfront/classes/integrations/media-library.php on line 159 [30-Mar-2023 14:54:25 UTC] PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function DeliciousBrains\WP_Offload_Media\Integrations\Media_Library::DeliciousBrains\WP_Offload_Media\Integrations\{closure}(), 4 passed in ***SITE_DIRECTORY***/wp-includes/class-wp-hook.php on line 287 and exactly 5 expected in ***SITE_DIRECTORY***/wp-content/plugins/amazon-s3-and-cloudfront/classes/integrations/media-library.php:159 Stack trace: #0 ***SITE_DIRECTORY***/wp-includes/class-wp-hook.php(287): DeliciousBrains\WP_Offload_Media\Integrations\Media_Library->DeliciousBrains\WP_Offload_Media\Integrations\{closure}(NULL, 24, '_wp_attached_fi...', true) #1 ***SITE_DIRECTORY***/wp-includes/plugin.php(206): WP_Hook->apply_filters(NULL, Array) #2 ***SITE_DIRECTORY***/wp-includes/meta.php(514): apply_filters('get_post_metada...', NULL, 24, '_wp_attached_fi...', true) #3 ***SITE_DIRECTORY***/wp-includes/post.php(2215): get_metadata('post', 24, '_wp_attached_fi...', true) #4 ***SITE_DIRECTORY***/wp-includes/post.php(499): get_post_meta(24, in ***SITE_DIRECTORY***/wp-content/plugins/amazon-s3-and-cloudfront/classes/integrations/media-library.php on line 159 [30-Mar-2023 14:54:25 UTC] PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function DeliciousBrains\WP_Offload_Media\Integrations\Media_Library::DeliciousBrains\WP_Offload_Media\Integrations\{closure}(), 4 passed in ***SITE_DIRECTORY***/wp-includes/class-wp-hook.php on line 287 and exactly 5 expected in ***SITE_DIRECTORY***/wp-content/plugins/amazon-s3-and-cloudfront/classes/integrations/media-library.php:159 Stack trace: #0 ***SITE_DIRECTORY***/wp-includes/class-wp-hook.php(287): DeliciousBrains\WP_Offload_Media\Integrations\Media_Library->DeliciousBrains\WP_Offload_Media\Integrations\{closure}(NULL, 24, '_wp_attached_fi...', true) #1 ***SITE_DIRECTORY***/wp-includes/plugin.php(206): WP_Hook->apply_filters(NULL, Array) #2 ***SITE_DIRECTORY***/wp-includes/meta.php(514): apply_filters('get_post_metada...', NULL, 24, '_wp_attached_fi...', true) #3 ***SITE_DIRECTORY***/wp-includes/post.php(2215): get_metadata('post', 24, '_wp_attached_fi...', true) #4 ***SITE_DIRECTORY***/wp-includes/post.php(499): get_post_meta(24, in ***SITE_DIRECTORY***/wp-content/plugins/amazon-s3-and-cloudfront/classes/integrations/media-library.php on line 159 [30-Mar-2023 14:54:25 UTC] PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function DeliciousBrains\WP_Offload_Media\Integrations\Media_Library::DeliciousBrains\WP_Offload_Media\Integrations\{closure}(), 4 passed in ***SITE_DIRECTORY***/wp-includes/class-wp-hook.php on line 287 and exactly 5 expected in ***SITE_DIRECTORY***/wp-content/plugins/amazon-s3-and-cloudfront/classes/integrations/media-library.php:159 Stack trace: #0 ***SITE_DIRECTORY***/wp-includes/class-wp-hook.php(287): DeliciousBrains\WP_Offload_Media\Integrations\Media_Library->DeliciousBrains\WP_Offload_Media\Integrations\{closure}(NULL, 24, '_wp_attached_fi...', true) #1 ***SITE_DIRECTORY***/wp-includes/plugin.php(206): WP_Hook->apply_filters(NULL, Array) #2 ***SITE_DIRECTORY***/wp-includes/meta.php(514): apply_filters('get_post_metada...', NULL, 24, '_wp_attached_fi...', true) #3 ***SITE_DIRECTORY***/wp-includes/post.php(2215): get_metadata('post', 24, '_wp_attached_fi...', true) #4 ***SITE_DIRECTORY***/wp-includes/post.php(499): get_post_meta(24, in ***SITE_DIRECTORY***/wp-content/plugins/amazon-s3-and-cloudfront/classes/integrations/media-library.php on line 159 [30-Mar-2023 14:54:26 UTC] PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function DeliciousBrains\WP_Offload_Media\Integrations\Media_Library::DeliciousBrains\WP_Offload_Media\Integrations\{closure}(), 4 passed in ***SITE_DIRECTORY***/wp-includes/class-wp-hook.php on line 287 and exactly 5 expected in ***SITE_DIRECTORY***/wp-content/plugins/amazon-s3-and-cloudfront/classes/integrations/media-library.php:159 Stack trace: #0 ***SITE_DIRECTORY***/wp-includes/class-wp-hook.php(287): DeliciousBrains\WP_Offload_Media\Integrations\Media_Library->DeliciousBrains\WP_Offload_Media\Integrations\{closure}(NULL, 24, '_wp_attached_fi...', true) #1 ***SITE_DIRECTORY***/wp-includes/plugin.php(206): WP_Hook->apply_filters(NULL, Array) #2 ***SITE_DIRECTORY***/wp-includes/meta.php(514): apply_filters('get_post_metada...', NULL, 24, '_wp_attached_fi...', true) #3 ***SITE_DIRECTORY***/wp-includes/post.php(2215): get_metadata('post', 24, '_wp_attached_fi...', true) #4 ***SITE_DIRECTORY***/wp-includes/post.php(499): get_post_meta(24, in ***SITE_DIRECTORY***/wp-content/plugins/amazon-s3-and-cloudfront/classes/integrations/media-library.php on line 159
If I revert the plugin back to v3.1.0 – everything works as it should again. I update the plugin to v3.2.0 or v3.2.1 again and the images no longer move to S3. Something has obviously changed from v3.1.0 and previous versions that is causing this issue, but I am unable to determine what exactly.
Any help is greatly appreciated! Thanks!
- The topic ‘Images fail to move to S3 using v3.2.0+’ is closed to new replies.