Hi, thanks for your reply. I was looking at your S3 client code but I’m afraid it’s a little beyond me. Fortunately I have an AWS bucket as well to test with, and I’ve done some debugging and while I haven’t solved the issue, I think I can point you to the problem:
I inserted some basic debug code into class-destination-s3.php, where the error message appears next to the bucket selection:
echo '<br/><pre>';
echo 'Options: <br/>';
esc_html_e(var_dump($options), 'backwpup' );
echo '<br/> Args: <br/>';
esc_html_e(var_dump($args), 'backwpup' );
echo '<br/> $aws_destination: <br/>';
esc_html_e(var_dump($aws_destination), 'backwpup' );
echo'</pre>';
RESULTS:
AWS WITH ENDPOINT SELECTED FROM LIST: works
Options:
NULL
Args:
array(10) {
[“s3accesskey”]=>
string(20) “[REMOVED]”
[“s3secretkey”]=>
string(40) “[REMOVED]”
[“s3bucketselected”]=>
string(0) “”
[“s3region”]=>
string(9) “us-west-2”
[“s3base_url”]=>
string(0) “”
[“s3base_region”]=>
string(0) “”
[“s3base_multipart”]=>
string(0) “”
[“s3base_pathstylebucket”]=>
string(0) “”
[“s3base_version”]=>
string(0) “”
[“s3base_signature”]=>
string(0) “”
}
$aws_destination:
object(BackWPup_S3_Destination)#1153 (1) {
[“options”:”BackWPup_S3_Destination”:private]=>
array(7) {
[“label”]=>
string(27) “Amazon S3: US West (Oregon)”
[“endpoint”]=>
string(0) “”
[“region”]=>
string(9) “us-west-2”
[“multipart”]=>
bool(true)
[“only_path_style_bucket”]=>
bool(false)
[“version”]=>
string(6) “latest”
[“signature”]=>
string(2) “v4”
}
}
AWS WITH CUSTOM ENDPOINT FILLED (using s3.us-west-2.amazonaws.com as above): doesn’t work
The s3 service does not have version: .
Options:
array(7) {
[“label”]=>
string(21) “Custom S3 destination”
[“endpoint”]=>
string(33) “https://s3.us-west-2.amazonaws.com”
[“region”]=>
string(0) “”
[“multipart”]=>
bool(false)
[“only_path_style_bucket”]=>
bool(false)
[“version”]=>
string(0) “”
[“signature”]=>
string(0) “”
}
Args:
array(10) {
[“s3accesskey”]=>
string(20) “[REMOVED]”
[“s3secretkey”]=>
string(40) “[REMOVED]”
[“s3bucketselected”]=>
string(0) “”
[“s3region”]=>
string(33) “https://s3.us-west-2.amazonaws.com”
[“s3base_url”]=>
string(33) “https://s3.us-west-2.amazonaws.com”
[“s3base_region”]=>
string(0) “”
[“s3base_multipart”]=>
string(0) “”
[“s3base_pathstylebucket”]=>
string(0) “”
[“s3base_version”]=>
string(0) “”
[“s3base_signature”]=>
string(0) “”
}
$aws_destination:
object(BackWPup_S3_Destination)#1153 (1) {
[“options”:”BackWPup_S3_Destination”:private]=>
array(7) {
[“label”]=>
string(21) “Custom S3 destination”
[“endpoint”]=>
string(33) “https://s3.us-west-2.amazonaws.com”
[“region”]=>
string(0) “”
[“multipart”]=>
bool(false)
[“only_path_style_bucket”]=>
bool(false)
[“version”]=>
string(0) “”
[“signature”]=>
string(0) “”
}
}
CONCLUSION:
It looks like the contents of the “S3 Server URL” form are not being passed to the actual arguments sent via AJAX, which would explain the error “The s3 service does not have version”, because the version option string is not being sent when using a custom endpoint. I can type anything into Region, Version, or Signature, as well as checking/unchecking Multipart and Path Style, with no change to the apparent output.
-
This reply was modified 4 years, 1 month ago by sylvank.