ryanhu
Forum Replies Created
-
Hi Nithin,
Here’s the link to the txt file with the export: https://drive.google.com/file/d/1qfPWZ8trmhEhIUNya8xqSLkD9_w9fdrC/view?usp=sharing
Best Regards
Hi Jair,
Thanks for your response. I understand that Forminator uses the built email delivery configuration in WordPress which is why I ruled this out before contacting you. I use an SMTP plugin which delivers other email from WooCommerce and other plugins.
I included the error log in my original post which shows where Forminator is failing with a fatal error upon sending. As a quick fix to get around it, I edited the function to be the below instead. But I do not know why the $value is null when a string is expected. After my quick fix, Forminator sends the email notifications successfully.
File: /wp-content/plugins/forminator/library/helpers/helper-fields.php
Original:
function forminator_replace_placeholder_in_urls( string $content, string $placeholder, string $value ): string {
$value = rawurlencode( $value );
$pattern = '#https?://[^\s"\'<>()]*' . preg_quote( $placeholder, '#' ) . '[^\s"\'<>()]*#i';
return preg_replace_callback(
$pattern,
static function ( $matches ) use ( $placeholder, $value ) {
return str_replace( $placeholder, $value, $matches[0] );
},
$content
);
}Edited:
function forminator_replace_placeholder_in_urls( string $content, string $placeholder, ?string $value ): string {
$value = rawurlencode( $value ?? '' );
$pattern = '#https?://[^\s"\'<>()]*' . preg_quote( $placeholder, '#' ) . '[^\s"\'<>()]*#i';
return preg_replace_callback(
$pattern,
static function ( $matches ) use ( $placeholder, $value ) {
return str_replace( $placeholder, $value, $matches[0] );
},
$content
);
}I had the same problem, and managed to resolve it. It is indeed caused by Yoast, but more specifically, the “Remove unregistered URL parameters” setting in Yoast.
To fix the issue, go to Yoast -> Settings -> Advanced -> ‘Crawl optimisation‘ and find the setting “Remove unregistered URL parameters“. You can turn this setting to ‘disabled’ to fix the issue, or alternatively you can add the parameter ‘key’ (sans quotes) to the ‘Additional URL parameters to allow’ section.