• I updated various WordPress plugins yesterday, including W3 Total Cache to 2.4.1. I’m now running WordPress 6.3, and all plug-ins and themes are up-to-date.

    I am only using W3 Total Cache for its “Origin Push” of files to Amazon S3 and then serving them via CloudFront. This worked properly prior to the updates, and my configuration parameters have not changed within W3TC.

    After the updates, W3TC does not communicate with S3 or CloudFront. and that causes several problems: I cannot upload images successfully. When I click to test the in the CDN configuration area of W3TC, it fails. However, I can use the same API key/secret to query data about the same S3 bucket via the AWS command line interface, so the credentials seem good (and none of that has changed).

    I tried disabling other plug-ins that I updated, and that does not help. Neither did downgrading W3TC to 2.3.3. I’m at a loss regarding how to troubleshoot this problem. Is there some way to see why the connection with AWS services is failing?

    If not, I made try using W3TC in a “origin pull” mode. I’d prefer avoid those hits on my WordPress services for images (even if it’s only every day or two), but if the origin push features are not working, I need a different solution.

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

    (@vmarko)

    Hello @djdavies75

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

    Seems that the issue is not related to the update because this would be solved with the downgrade to the previous version.
    Have you tried re-configuring the bucket and the AWS in the W3TC settings and create another bucket and see if the connection test fails?

    Thanks!

    Thread Starter djdavies75

    (@djdavies75)

    The issue is related to some sort of update (I updated several gems, although disabling those does not make this issue go away), but I agree it is not restricted to the W3TC update.

    I have tried different AWS credentials, and they all fail.

    Is there some way to get details beyond “Test Failed” when W3TC tries to initiate an AWS connection?

    My bucket settings and the IAM permissions of the AWS user have not changed, but I will test whether W3TC can work with a different bucket. I don’t expect that to be a part of any solution since I don’t want to move my data to a new bucket.

    I have no idea if this is related.
    But we’re also having issues with WP & cloudfront after upgrading to 6.3

    We use Supercache not W3TC
    We’re not using S3 – using cloudfront for entire website.

    New posts are on the cloudfront website, but the Home page and all category pages are stale. And invalidating them is not refreshing them.

    The origin works perfectly.

    So either AWS is having some kind of issue
    Or 6.3 is causing issues but weird that’s it’s only showing for cloudfront.

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @nm001

    Thank you for the information.
    @djdavies75 is there a chance you can downgrade the WP version to the previous one and let me know if the issue persists for you?

    Thanks!

    Thread Starter djdavies75

    (@djdavies75)

    The problem started after updating W3TC and a few other plug-ins (which I believe I have since tried to disable). I was running WordPress 6.1.3 at that time.

    After that I upgraded to WordPress 6.3 and I updated my theme. to make sure that nothing out-of-date was causing an issue.

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @djdavies75

    Thank you for your patience.
    I am trying to replicate this problem with no success.
    I’ll try some more test and get back to you if I need more information.

    Thanks!

    Thread Starter djdavies75

    (@djdavies75)

    This is still a problem for me. I was able to connect to the same S3/CloudFront configuration with the same credentials on a different WordPress installation, so something is unique to the one where I’m having problems. I looked at my webserver logs, and I see:

    2023/12/14 14:40:37 [error] 3437#3437: *17811465 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Error: Class "Aws\Credentials\C                                                                         redentials" not found in /efs/wordpress/wp-content/plugins/w3-total-cache/CdnEngine_CloudFront.php:36
    Stack trace:
    #0 /efs/wordpress/wp-content/plugins/w3-total-cache/CdnEngine_CloudFront.php(179): W3TC\CdnEngine_CloudFront->_init()
    #1 /efs/wordpress/wp-content/plugins/w3-total-cache/Cdn_AdminActions.php(428): W3TC\CdnEngine_CloudFront->test()
    #2 /efs/wordpress/wp-content/plugins/w3-total-cache/Root_AdminActions.php(25): W3TC\Cdn_AdminActions->w3tc_cdn_test()
    #3 /efs/wordpress/wp-content/plugins/w3-total-cache/Generic_Plugin_Admin.php(135): W3TC\Root_AdminActions->execute()
    #4 /efs/wordpress/wp-includes/class-wp-hook.php(324): W3TC\Generic_Plugin_Admin->load()
    #5 /efs/wordpress/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
    #6 /efs/wordpress/wp-includes/plugin.php(517): WP_Hook->do_action()
    #7 /efs/wordpress/wp-admin/admin.php(237): do_action()
    #8 {main}
      thrown in /efs/wordpress/wp-content/plugins/w3-total-cache" while reading response header from upstream, client: 172.30.1.186, server: XXXXX.com, request: "POST /blog/wp-admin/admin.php?page=w3tc_dashboard HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "XXXXX.com",                                                                          referrer: "https://XXXXX.com/blog/wp-admin/admin.php?page=w3tc_cdn"

    It seems like the plugin (or PHP) can’t make some AWS calls, and that would be problematic. Any idea how to resolve this? I’ve tried removing and re-installing the W3TC plugin, but I could try that again.

    Thread Starter djdavies75

    (@djdavies75)

    Any additional advice for this? I do not believe I have any other plug-ins that actively use anything AWS-related, so this error surprises me.

    I am having a similar problem. We noticed that images were no longer getting pushed to S3 automatically (but they are on the origin EC2 instance), but they do get uploaded if I choose the “upload attachments” button in the CDN settings. When this problem presented itself, I discovered that I had an unauthorized administrator using in my AWS account, created around approximately the same time. I am not sure how they gained access, but my api key for the AWS connection had disappeared. I created a new passkey and the W3TC test now passes, but the images I upload to my media library still don’t go to S3 like they used to.

    Thread Starter djdavies75

    (@djdavies75)

    @vmarko do you have any more suggestions now that I shared specific errors?

    @djdavies75 – I am looking at your errors to see if it gives me any ideas about mine. It looks like it cannot find the Credentials class, (PHP message: PHP Fatal error: Uncaught Error: Class “Aws\Credentials\Credentials” not found), so I am wondering: does your file installation path include the AWS files at /plugins/w3-total-cache/vendor/aws/aws-sdk-php/src/Credentials/Credentials.php ? Or maybe is the file there, but permissions for the file or folder tree are insufficient?

    As an aside, while searching for that file, I discovered that the WP Offload SES plugin also uses a copy of the AWS sdk, so that could potentially be a point of conflict. I’m going to see if disabling my other AWS-dependent plugins fixes my problem.

    Thread Starter djdavies75

    (@djdavies75)

    Thanks. All the plug-in files are there (including a w3-total-cache/vendor/aws/aws-sdk-php/src/Credentials directory with a Credentials.php file), and the permissions are the same as for everything else in WordPress (plus, they’re world-readable). It certainly seems like the problem is that the CdnEngine_CloudFront.php part of W3TC cannot find the Credentials piece of the AWS SDK, but I don’t know how to fix that.

    As far as I can tell, I have no plug-ins that are doing anything related to AWS, at least not actively. I use one plug-in (Post SMTP) that is capable of using AWS SES, but I’m not using that feature, and W3TC didn’t work any better when Post SMTP was disabled.

    My problem ended up being totally unrelated. I had checked the “only purge CDN manually” button, and that’s why my images weren’t getting transferred to S3 – it wasn’t a credentials problem for me. I hope you get some help from someone that can solve the mystery with you! Good luck!

    Hello.

    I also have a site where this is happening.

    Keeps giving me “test failed” but credentials are good and was working.

    Are there any news about this issue @vmarko ?

    Thank you!

    UPDATE.

    I reverted from W3 Total Cache 2.7.3 back to 2.7.2 and everything worked.

    So, something must be going on with v.2.7.3

    Thank you!

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