sylvank
Forum Replies Created
-
Hi, it looks to me like you haven’t enabled Default Bucket retention. See: https://help.backblaze.com/hc/en-us/articles/1260804786409-Default-Bucket-Retention-Immutability-
My understanding is: that means that the files uploaded by BackWPUp don’t have object lock applied, because the plugin isn’t setting an object lock expiry time itself via the API (and I haven’t seen the option). You can check if the files are actually locked by browsing the files in your bucket and clicking the Info button which will show the Object Lock status, or attempting to delete a file.
If you select the bucket settings and set a Default Bucket Retention time, the Info display on a newly-uploaded file should show the enabled Object Lock status & duration, as well as deletion now not being possible (if you select file then delete, it will alert you the file cannot be deleted).
It is when a Default Retention is set that the above header Content-MD5 error is generated when attempting to run the backup job.
My desire to use object lock is so that if a WordPress site is compromised, and the B2/S3 API key is extracted from the database, the site backups are protected from deletion by the hacker.
Thanks for looking into this!
Forum: Plugins
In reply to: [Co-Authors Plus] Newest update making links appear as plain textIt looks like version 3.4.7 released a few hours ago fixes this issue.
Hi @duongcuong96 thank-you for looking into this. I see you improved edit_inline_js(). Here is a log of my test:
Removed BackWPup version 3.8.0
Uploaded “backwpup_custom s3 improvement” as provided.
Activated. Created new “B2 Test” job.
Entered B2 connection details.
Checked Disable BackWPUp’s peer certificate verification…” as requested.
Error: “Missing secret access key!” – secret key has been entered. Note this is different from the “The s3 service does not have version: .” error displayed in the previous version.Modified S3 connection details to AWS US-West (removed Backblaze B2 server info). Bucket correctly listed (login OK), no error.
I uncommented your var_dump entries in “class-destination-s3.php”.
I tried entering the AWS server s3.us-west-2.amazonaws.com as the Endpoint, along with my AWS S3 credentials. Error: “The authorization header is malformed; a non-empty region must be provided in the credential.”
It appears that neither “region” nor “s3base_region” are being updated correctly from the input text element.
I used:
Endpoint: s3.us-west-2.amazonaws.com
Region: THISISMYREGION (I used a valid one as well)
Access key: access (tested with valid one as well)
Secret key: secret (tested with valid one as well)var_dump:
array(8) { ["label"]=> string(21) "Custom S3 destination" ["endpoint"]=> string(33) "https://s3.us-west-2.amazonaws.com" ["region"]=> string(0) "" ["multipart"]=> bool(true) ["only_path_style_bucket"]=> bool(false) ["version"]=> string(6) "latest" ["signature"]=> string(2) "v4" ["http"]=> bool(true) } array(11) { ["s3accesskey"]=> string(6) "access" ["s3secretkey"]=> string(6) "secret" ["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(1) "1" ["s3base_pathstylebucket"]=> string(1) "0" ["s3base_version"]=> string(6) "latest" ["s3base_signature"]=> string(2) "v4" ["s3base_disablecert"]=> string(1) “1” } The authorization header is malformed; a non-empty region must be provided in the credential.
If you have access to AWS then you can test your code that way instead.
OH! Just had an idea. I edited “class-s3-destination.php” and added at line 167:
'b2test' => array( 'label' => __('Backblaze B2', 'backwpup'), 'endpoint' => 'https://s3.us-west-000.backblazeb2.com', 'region' => 'us-west-000', ),
Used my access & secret keys. Connected perfectly and showed existing bucket. Ran job, worked fine.
So the current issue appears to be region field not being correctly used for custom endpoints.
Hi again, I was curious so took a further look.
I think the problem is that you are missing several of the form fields in the function edit_inline_js().
I added these lines and it works now to connect to my AWS S3 bucket (entering the endpoint via the form):
s3base_region : $( 'input[name="s3base_region"]' ).val(), s3base_version : $( 'input[name="s3base_version"]' ).val(), s3base_signature : $( 'input[name="s3base_signature"]' ).val(),
That doesn’t include the values of s3base_multipart or s3base_pathstylebucket yet however (so those aren’t saved).
I also recommend updating awsgetbucket() when any change is made to the input form, not just the text fields listed near the bottom of edit_inline_js().
I was unable to connect to B2 however; it appears the endpoint URL is truncated to 36 characters:
["s3region"]=> string(36) "https://s3.us-west-000.backblazeb2.co" ["s3base_url"]=> string(36) "https://s3.us-west-000.backblazeb2.co"
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:
NULLArgs:
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.
Works great. Thanks!
I’ve run into the same problem, and written the plug-in author:
Hello, I’ve run into a problem it looks like a few other users have as well:
https://www.ads-software.com/support/topic/203626?replies=12
Specifically, here is the issue:
I have created a privately hosted blog with a static Page named “Home”. I have created a second static Page named “Blog”. In the WordPress Settings – Reading section I have set “Front page” to “Home” and the “Posts page” to “Blog”. I don’t think this is especially unusual.
By default, without AiOSEO enabled, both the Home page and Blog page will have titles of just “Blogname”. Unfortunately, AiOSEO does this as well: any changes made in the AIOSEO Options page to the “Home Title:” section appear on BOTH the “Home” page (the default static page that appears when the site loads), as well as the “Blog” page (the one where posts appear).
I have tried adding a custom title to both pages in the AiOSEO section of the respective pages where you can specify a different title. This field works correctly for other static pages, overwriting the default title, but not these two pages.
To address this problem I would like to make two suggestions:
1. AIOSEO should take into account when the user has a separate home/main page on the site, and posts page, and allow for creating different titles and tags for each.
2. AIOSEO should allow title/description/keywords entered into the Page itself to supersede defaults in the AIOSEO settings page.
Thanks!
Forum: Fixing WordPress
In reply to: Posts won’t show up when posts permalink is under blog posts pageI’ve run into the same problem again. I tried setting the permalink structure to:
/blog/%category%/%postname%/
with the category base as
blog
Surely this should be a dead-obvious use for this feature: group related posts under a topic, with the top level listing those posts, then all posts appearing under that directory.
Any idea on how to get this working?
Forum: Fixing WordPress
In reply to: Posts won’t show up when posts permalink is under blog posts pageProblem solved. The issue was I had set the categories permalink also to /blog/ . Changing it to /blog/topics/ appears to have fixed it.
Forum: Fixing WordPress
In reply to: Extracting single Tag or Category to a separate PageOk, I managed to pretty much accomplish what I was aiming for with the above, plus the Advanced Permalinks plugin.
Forum: Fixing WordPress
In reply to: Extracting single Tag or Category to a separate PageThank-you again Esmi. I managed to answer my second question thanks to this site:
https://vandelaydesign.com/blog/wordpress/category-hacks/
What I did was:
Add to the Books posts page:
<?php query_posts('cat=3'); ?>
And to the main blog page:
<?php query_posts('cat=-3'); ?>
However, I’m left with an additional problem:
Posts appear with their permalink as /blog/booktitle/. Is there a way to make normal posts appear as /blog/postname, but have books appear as /book/booktitle/ ?
Thanks!
Forum: Fixing WordPress
In reply to: Extracting single Tag or Category to a separate PageThanks! That gets me about halfway there (but a little disappointing it can’t be done within the WP interface).
The other part I need, is excluding certain categories or tags (“books”, in this example) from the main blog page, as I don’t want them showing up there.