Nicholas Turbanov
Forum Replies Created
-
To answer my own question, this is indeed the problem:
PHP message: Aws\S3\Exception\InvalidRequestException: AWS Error Code: InvalidRequest, Status Code: 400, AWS Request ID: 41663B7376FA5EB5, AWS Error Type: client, AWS Error Message: The authorization mechanism you have provided is not supported. Please use AWS4-HMAC-SHA256., User-Agent: aws-sdk-php2/2.7.12
As you can see, I actually updated the SDK too to the latest version.
Any chance you might be able to look into this?
Thanks!
Hey Sylvian,
Yeah, everything works for me now, thank you so much!
Forum: Plugins
In reply to: [Broadcast] WPML integration not workingThanks Edward, I’ll try your patches.
And the thread is still there, that link is just messed up
https://wpml.org/forums/topic/relating-to-the-documentation-survey/
??
You can see the difference with these tests:
with isU
https://www.regex101.com/r/wQ3wA8/7
https://www.regex101.com/r/wQ3wA8/8with i
https://www.regex101.com/r/wQ3wA8/5
https://www.regex101.com/r/wQ3wA8/6with im
https://www.regex101.com/r/wQ3wA8/3
https://www.regex101.com/r/wQ3wA8/4So I think im is the best choice.
I had multiple recipients in the same field, comma separated, so no cc or bcc, just to. Amazon SES doesn’t like that. So yes, the only choice is to loop through the addresses separately.
Thanks!
Hey,
On line 448 in wp-ses.php you have:
if (preg_match('/^From: (.*)/isU', $headers, $rto)) {
but I’m pretty sure it should be
if (preg_match('/^From: (.*)/i', $headers, $rto)) {
The s and the U modifier break the matching with a multiline header.
The s makes the dot match newline characters as well but we only need the first line of the header as ‘From:’ is always the first line. Or you could use “im” which would make it multiline, in case ‘From:’ isn’t the first line.
I’m not sure why you’ve added the U because the ungreedyness is what breaks the whole matching.
Anyways, I’m terrible with regex and simply used https://www.regex101.com/ to debug this.
My original problem was actually two-fold: it was both the regex and I also had multiple recipients, which the SES API doesn’t support. Are you perhaps planning on supporting multiple recipients any time soon?
Hey,
I managed to track down my issue to the regex that checks the reply-to header. For whatever reason neither “headers” or the email address I use are accepted. Thus the problem is not with the form plugins.
I’ll report back once I figure it out.
Forum: Plugins
In reply to: [Broadcast] WPML integration not workingOh and one clarification (in reference to the apocalyarts’s original post), the language information is broadcast correctly in my case so English is English and Arabic is Arabic in both blogs – just the translation connection between them seems lost.
Forum: Plugins
In reply to: [Broadcast] WPML integration not workingHey Edward,
We’re looking into using Broadcast and it seems perfect for our needs, but as we have multilingual content we unfortunately must have WPML support.
So I just did a fresh install and trying your plugin with WPML, it seems to work, except the translation connection is lost. So is this what you’re referring to when you say WPML still needs to be patched?
Ie. I created a post in English and translated it to Arabic in my “main” blog. I first broadcast the English post and it appeared fine in my “sub” blog. I then broadcast the Arabic translation and again it appeared fine in the “sub” blog. However, the posts in the “sub” blog are not connected – they don’t know they’re each other’s translations.
So again, is this how it’s supposed to work atm and are we thus dependant on WPML’s updates? If that’s the case it’s probably no use since their support is horrible (you can see my rant here https://wpml.org/forums/topic/relating-to-the-documentation-survey/).
Thanks!
You can disable the default email by adding this to your functions.php:
add_filter( 'wpmu_welcome_user_notification', '__return_false' );
User will only receive the SB Welcome email.
Forum: Plugins
In reply to: [Export User Data] Non-unique meta fieldsSo this works for me know.
Thanks!
Forum: Plugins
In reply to: [Export User Data] Non-unique meta fieldsCool, I ended up just modifying your plugin to include another filter that uses get_user_meta when applicable, with the same logic you provided.
public function known_not_unique() { return apply_filters( 'export_user_data_not_singular', array() ); } // check if field is known not to be unique if ( in_array ( $field, $this->known_not_unique() ) ) { $value = get_user_meta($user->ID, $field, false); }
and in my functions.php
function my_export_user_data_not_singular( $array ) { array_push( $array, 'wpcf-keskeiset-something' ); return $array; } add_filter( 'export_user_data_not_singular', 'my_export_user_data_not_singular' );
BTW there’s a slight error with your code example, array_push returns the number of items in the array, not the array itself ??
Forum: Plugins
In reply to: [Export User Data] Non-unique meta fieldsThe value itself is not an array (the value of meta_value), so this doesn’t work – it throws a PHP warning:
“PHP Warning: in_array() expects parameter 2 to be array, integer given in”
I’ll try to explain myself more clearly. Here’s my wp_usermeta table:
umeta_id | user_id | meta_key | meta_value -------------------------------------------------------------- 1 | 966 | wpcf-something | A string -------------------------------------------------------------- 2 | 966 | wpcf-something | Another string -------------------------------------------------------------- 3 | 966 | wpcf-something | One more string --------------------------------------------------------------
In the export options, I’ve selected ‘wpcf-something’ as a field to be exported. Only ‘A string’ appears in the exported Excel file, under the column ‘wpcf-something’.
Unfortunately I don’t really have time at the moment to go through your code (I’ll gladly help later), but you don’t seem to use ‘get_user_meta’, which directly supports non-unique meta keys.
Forum: Plugins
In reply to: [Export User Data] Non-unique meta fieldsHey,
Thanks, but it’s still only exporting one line.
So what I have in the db in the wp_usermeta table are distinct rows with the same meta_key value (and user_id value), but different umeta_id values (and meta_value values).
What I get in the Excel file is just the meta_value of the row with the lowest umeta_id.
Hope this helps and thanks for the effort!
Forum: Plugins
In reply to: [Login Security Solution] Force strongs user passwordUh, I’m a moron and seem to have posted in the wrong plug-ins support thread. Please delete.
Forum: Plugins
In reply to: [Custom Post Type Maker] Support all the parametersOh yeah, it seems saving changes in your plugin doesn’t flush the permalink structure which means things won’t work until you go save them in WP’s settings.