wp-headless
wp-headless copied to clipboard
ERROR! Publish Production
Keep getting this error when trying to publish a page to s3 bucket.
ERROR! Failed upload: /index.html
Have you added your aws credentials?
Sent from my iPhone
On Jun 7, 2018, at 10:09 PM, Ralph Vugts [email protected] wrote:
Keep getting this error when trying to publish a page to s3 bucket.
ERROR! Failed upload: /index.html
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
Thanks Drew, Yes added those. I can upload my media to it fine.
Hmm is there any more details for the error? Can you look at the logs for apache?
I was having a similar problem, but it was failing at the canUpload()
function. After some digging I noticed that both awsAccessKey and awsSecretKey were returning empty strings. I updated the way in which I was setting those values, since I'm defining them in my wp-config file with:
define( 'DBI_AWS_ACCESS_KEY_ID', 'KEY_VALUE_HERE' );
define( 'DBI_AWS_SECRET_ACCESS_KEY', 'SECRET_KEY_HERE' );
Changing get_site_option(Amazon_Web_Services::SETTINGS_KEY)
with the values defined above instead fixed my issue. So uploader.php now looks like this:
$this->settings["awsAccessKey"] = DBI_AWS_ACCESS_KEY_ID;
$this->settings["awsSecretKey"] = DBI_AWS_SECRET_ACCESS_KEY;
I'm assuming the original method is defined from defining the keys through the AWS plugin in Wordpress, but Amazon suggests setting in wp-config so I'm just used to doing that. Hoping this helps with this issue!
Thanks. I have the same issue. No errors on publish but the JSON files don't make it to the bucket even though the media files upload just fine.
I echoed $this->settings["awsAccessKey"] etc in the uploader.php file just to see what was there and the values were blank so I did what the poster above did. Now I get an error, but there are no details to the error. Is there a way to modify uploader.php to echo the error?
NOTE: I'm echoing out the results of some of the lines and it looks like the instantiation of the initial S3 object works fine. The putBucket command fails and the putObjectFile command fails. I echoed out all the fields going into putobjectfile and it seemed fine.
very odd - the plugin is using what is stored via the AWS plugin, there may be an issue where they've changed how those credentials are accessed. I will look into this.