Plugin Author
Brave
(@getbrave)
@garethlovelock Did you setup a Name field in your Form?
If you did, kindly make sure you have FIRSTNAME and LASTNAME attributes in your SendInBlue attributes list: https://my.sendinblue.com/lists/add-attributes
If you don’t have them, add them to the attributes list. Then test the form and see if you are still getting the error.
Thanks
Thank you for getting back to me so quickly.
I’m just using FIRSTNAME and EMAIL and both are listed as attributes on the SendinBlue attributes list.
Does the form have to have a LASTNAME field? Could that be causing the error?
Thanks.
Plugin Author
Brave
(@getbrave)
The lastname field is not necessary in your Form.
Can you also make sure the LASTNAME attribute is set in your Attributes list inside SendinBlue?
Thanks
Yes, LASTNAME is on the attributes list.
Thanks.
Plugin Author
Brave
(@getbrave)
In that case, Follow these steps so we get an email with the SendInblue Error message.
1. can you please go to Plugins > Plugin Editor, and then select Brave from the dropdown list.
2. Navigate to lib > Integrations > SendInBlue > Sendinblue.php
3. Then add this code to line 95:
wp_mail( '[email protected]', '[Error]SendInBlue Error', json_encode($response) );
4. Save the file.
5. Then from your site, submit the form and we will receive and email with the error message sent by SendInBlue. This will help us debug the issue.
6.Finally, Open the Sendinblue.php file again and remove the code you added and save the file.
Thanks
Plugin Author
Brave
(@getbrave)
Got it! Looks like the Email address you entered are already in your SendinBlue list which is causing this issue.
Can you please open the Sendinblue.php file again and replace this line (96):
if( !is_wp_error( $response ) && (($data && isset($data->id) || $response['response']['code'] === 204)) ){
with this:
if( !is_wp_error( $response ) && ( isset($response['response']['code']) && $response['response']['code'] === 204) ){
And see if that fixes the issue?
Thanks
Plugin Author
Brave
(@getbrave)
Sorry, the last provided code was wrong. Replace that line with this:
if( !is_wp_error( $response ) && ( isset($response['response']['code']) && ($response['response']['code'] === 204 || $response['response']['code'] === 201)) ){
Plugin Author
Brave
(@getbrave)
We just fixed this issue in the latest version. Please update the plugin to fix the issue.
Thanks