• Resolved ande1352

    (@ande1352)


    I just updated to version 2.6, and media files no longer seem to be offloading to my S3 bucket. Prior to updating it was working just fine, files were processed with ShortPixel image software and then offloaded to S3, uploaded to the bucket with a URL like this: “https://cdn.example.com/wp?content/uploads/2022/03/11110626/photo.jpg
    “.

    Now when I upload the files to WordPress the files are still processed by Short Pixel, but they never seem to offload to s3.

    I checked and the IAM user policy is set to “AmazonS3FullAccess” and on the bucket, it is set to “Block all public access disabled”, ACLs are enabled.

    I tried setting up a debug log as mentioned on your post (https://deliciousbrains.com/why-use-wp-debug-log-wordpress-development/), but after adding items to wp-config, nothing happens, I don’t see a debug.log in the content directory?

    Not sure what to do in order to figure out what’s going on. It was working fine prior to the update for a couple of years at least, and this latest update to 2.6 seems to have broken something?

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Delicious Brains

    (@deliciousbrains)

    Hey @ande1352, to help us isolate whether this is a conflict with ShortPixel, can you test uploading an image without ShortPixel activated and let us know if the image gets offloaded successfully? If that’s the case, we can look further into compatibility with ShortPixel. -KH

    Thread Starter ande1352

    (@ande1352)

    I just uploaded another media file after finding the debug log in another directory and I see this error after uploading the file:

    [11-Mar-2022 19:45:11 UTC] PHP Fatal error: Uncaught Error: Call to undefined method Amazon_S3_And_CloudFront::upload_attachment() in /home/quick42/public_html/wp-content/plugins/shortpixel-image-optimiser/class/external/wp-offload-media.php:235
    Stack trace:
    #0 /home/quick42/public_html/wp-includes/class-wp-hook.php(307): ShortPixel\wpOffload->image_upload(‘131675’)
    #1 /home/quick42/public_html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array)
    #2 /home/quick42/public_html/wp-includes/plugin.php(474): WP_Hook->do_action(Array)
    #3 /home/quick42/public_html/wp-content/plugins/shortpixel-image-optimiser/class/db/shortpixel-meta-facade.php(1108): do_action(‘shortpixel_imag…’, ‘131675’)
    #4 /home/quick42/public_html/wp-content/plugins/shortpixel-image-optimiser/shortpixel_api.php(894): ShortPixelMetaFacade->optimizationSucceeded()
    #5 /home/quick42/public_html/wp-content/plugins/shortpixel-image-optimiser/shortpixel_api.php(289): ShortPixelAPI->handleSuccess(Array, Array, Object(ShortPixelMetaFacade), 1)
    #6 /home/quick42/public_html/wp- in /home/quick42/public_html/wp-content/plugins/shortpixel-image-optimiser/class/external/wp-offload-media.php on line 235

    When I disable shortpixel and upload a file, it appears that the file was uploaded to the S3 instance just fine and it shows that it has been uploaded in the media detail page.

    adventurequalifications

    (@adventurequalifications)

    I have identified they the files ARE off loading, but its not re writing the URLs so they no longer show in the website. This happened immediately after upgrading.

    Plugin Author Delicious Brains

    (@deliciousbrains)

    Hey @ande1352,

    Looks like ShortPixel is reaching inside WP Offload Media and calling a function that was removed in v2.6.

    We didn’t know they were doing something like this.

    Please can you contact ShortPixel about this and share that debug.log entry.

    Feel free to mention that we’d gladly help them work out a better way of accomplishing what they’re trying to do if they get stuck. Our email address can be found on https://deliciousbrains.com/contact-us/.

    -IJ

    Thread Starter ande1352

    (@ande1352)

    Thank you. I have reached out to the support email for Short Pixel and have mentioned your willingness to work with them on a fix.

    Plugin Author Delicious Brains

    (@deliciousbrains)

    Thanks @ande1352, ShortPixel have got in contact and we’re helping them with their compatibility code.

    -IJ

    I encountered the exact same issue. If you could please keep this thread updated, I’d appreciate it!

    Plugin Author Delicious Brains

    (@deliciousbrains)

    I’m sure ShortPixel will mention their fixed WP Offload Media compatibility in their changelog, but yes, we’ll mention their fix is out here when it happens.

    In the meantime, if a site is having this issue, please just deactivate ShortPixel Image Optimizer.

    -IJ

    Plugin Author Delicious Brains

    (@deliciousbrains)

    Looks like ShortPixel Image Optimizer 4.22.9 was released a few days ago with a fix for their compatibility with WP Offload Media.

    -IJ

    Thread Starter ande1352

    (@ande1352)

    ShortPixel version Version 4.22.9 fixes the issue for me. iF you’re having the same issue, an update should fix it.

    Plugin Author Delicious Brains

    (@deliciousbrains)

    Thanks for confirming that ShortPixel have fixed the issue, much appreciated.

    -IJ

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Media not offloading to S3 after update to 2.6’ is closed to new replies.