• Not sure if this is related to a recent update, we are using WP 6.2.2 with the latest Offload Media plugin 3.2.4 and cannot edit the settings. The site uses an Amazon S3 storage provider. I updated our staging server to use our new Cloudfront CDN URL a month or two ago and all worked fine with the settings. However, now when I go to either server, I see this:

    Media cannot be offloaded due to missing access keys

    The access keys have not changed and uploading media is working without issue. If I click to check again, it fails with same message above. When I visit the ‘update access keys’, it shows correctly that the keys are in the wp-config.php file. Save and Continue button brings me back to same page with refresh link which results in same error message above. Again, uploading media to the S3 storage works without issue.

    Can someone suggest how I can get the settings to recognize the storage provider again?

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

    (@deliciousbrains)

    Please can we see Diagnostic Info from WP Offload Media’s “Support” tab, and debug.log output captured during a failed “Check again”?

    https://deliciousbrains.com/why-use-wp-debug-log-wordpress-development/

    -IJ

    Thread Starter wmnf

    (@wmnf)

    With DEBUG enabled, I get nothing. There were a lot of Deprecated messages, then I deactivated all plugins throwing such messages to get a cleaner output. Then when I click “Check again”, no output at all. This staging server is running PHP 8.2.

    Plugin Author Delicious Brains

    (@deliciousbrains)

    Hey @wmnf,

    Please can you double-check that the site’s access key defines are above the following comment in the wp-config.php file?

    /* That's all, stop editing! Happy publishing. */

    -IJ

    Thread Starter wmnf

    (@wmnf)

    Yes, that is one of the first things I did. I verified still active in the AWS console. Interestingly enough, I went into the staging server again this morning and find the status green with the message ‘Storage provider is successfully connected and ready to offload new media.’. However, if I click ‘Check now’, it turns red and gives the message I originally posted.

    The Media Library continues to function without issue offloading media uploaded.

    Plugin Support Delicious Brains Support

    (@dbisupport)

    Hi @wmnf,

    Thank you for your response. Would you be able to send the diagnostic info of the site? It’s found on the support tab of the plugin.

    Can you also kindly check the browser console when the error message “Media cannot be offloaded due to missing access keys” shows up again?

    We look forward to your response!

    Thread Starter wmnf

    (@wmnf)

    Thanks for the help. Nothing was found in the console of the browser while loading the page or selecting ‘Check again’. What is the best way to send the downloaded diagnostic info?

    Plugin Support Delicious Brains Support

    (@dbisupport)

    Hi @wmnf ,

    You can paste the diagnostic info with your reply here. Since this is a public forum, you can remove any data that you are not comfortable sharing.

    Also, going back to this: “then I deactivated all plugins throwing such messages to get a cleaner output. Then when I click “Check again”, no output at all.”
    — Did the check pass this time when all other plugins were disabled? If so, another plugin might be interfering with WP Offload Media.

    Another test you can do is to temporarily switch to a default WordPress theme like Twenty Twenty to see if the issue persists.

    Another thing to check is if you are still using the constants below:

    AWS_ACCESS_KEY_ID
    AWS_SECRET_ACCESS_KEY

    They are legacy keys, and if they are only used for WP Offload Media, it is better to comment them out or remove them. We have received reports before of the legacy keys interfering with the newer AS3CF_SETTINGS constant.

    https://deliciousbrains.com/wp-offload-media/doc/settings-constants/

    I hope this helps, let us know how it goes for you.

    Thread Starter wmnf

    (@wmnf)

    On our staging server, I’ve deactivated all plugins other than this and switched to the Twenty-Twenty-Three theme. The issue persists.

    $ grep AWS wp-config.php
    define( 'AWS_ACCESS_KEY_ID', 'aws key' );
    define( 'AWS_SECRET_ACCESS_KEY', 'aws secret' );

    Took another look at the DEBUG log and browser console and found nothing. Is there somewhere in AWS I can see related logs?

    Plugin Support Delicious Brains Support

    (@dbisupport)

    Hi @wmnf,

    It looks like you’re using legacy keys. Can you kindly confirm if it’s only used for WP Offload Media? If so, it’s better to comment them out or remove them.

    We have received reports before of the legacy keys interfering with the newer AS3CF_SETTINGS constant:

    https://deliciousbrains.com/wp-offload-media/doc/settings-constants/

    Otherwise, please try using these two defines for WP Offload Media that take precedence:

    AS3CF_AWS_ACCESS_KEY_ID
    AS3CF_AWS_SECRET_ACCESS_KEY

    We’re not sure if AWS would be able to detect these, but it might be best to contact their support about their logs.

    Thread Starter wmnf

    (@wmnf)

    Adding the AS3CF_ prefix did not work, the same result. If I choose to store the key and secret in the database, all works. I didn’t know about my wp-config settings being legacy, are the AS3CF_SETTINGS recommended? But there are some AS3CF_SETTINGS I’m not sure of the proper setting. Perhaps you have another document that will answer these questions? …

    key-file-path – is this expecting a JSON value or to generate?
    use-server-roles – I assume this should be false if I’m using key/secret?
    delivery-provider – this should be aws? In my GUI, I see this set to Other, but the other CDN field is blank.

    Nonetheless, if I use AS3CF_SETTINGS in place of the key and secret in the wp-config file, it detects the settings but keeps refreshing back to the Storage Provider page with a refresh link when Save and Continue is selected.

    define( 'AS3CF_SETTINGS', serialize( array(
        'provider' => 'aws',
        'access-key-id' => 'my key',
        'secret-access-key' => 'my secret',
        'key-file-path' => '/var/www/aws.json',
        'use-server-roles' => false,
        'bucket' => 'my bucket',
        'region' => 'us-east-1',
        'copy-to-s3' => true,
        'enable-object-prefix' => true,
        'object-prefix' => 'wp-content/uploads/',
        'use-yearmonth-folders' => true,
        'object-versioning' => false,
        'delivery-provider' => 'other',
        'delivery-provider-name' => '',
        'serve-from-s3' => true,
        'enable-delivery-domain' => true,
        'delivery-domain' => 'cdn.domain.org',
        'enable-signed-urls' => false,
        'signed-urls-key-id' => '********************',
        'signed-urls-key-file-path' => '/path/to/key/file.pem',
        'signed-urls-object-prefix' => 'private/',
        'force-https' => false,
        'remove-local-file' => true,
    ) ) );
    Plugin Support Delicious Brains Support

    (@dbisupport)

    Hi @wmnf ,

    You can follow our guide below on how to set up the settings using the AS3CF_SETTINGS constant. For Amazon S3, you only need at the minimum provider, access-key-id, and secret-access-key. The rest can be managed in the plugin page.

    https://deliciousbrains.com/wp-offload-media/doc/amazon-s3-quick-start-guide/#save-access-keys

    I hope this helps, let us know how it goes for you.

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘Can’t update settings’ is closed to new replies.