Contact already in list prevent custom redirect

Created on 28 September 2023, about 1 year ago
Updated 11 July 2024, 4 months ago

Problem/Motivation

When i submit an email already submitted i have this error

RequestException: Contact already in list and/or does not exist, invalid_parameter

this error prevent webform redirect.
i think that webform must complete the submission process.
thank you

Steps to reproduce

Go to settings confirmation page and setup "URL (redirects to a custom path or URL)" in confirmation type
Got to form and submit 2 times with same email address.

🐛 Bug report
Status

Active

Version

1.2

Component

Code

Created by

🇮🇹Italy trickfun

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @trickfun
  • 🇮🇹Italy trickfun

    same erro for mobile phone

    Unable to create contact, SMS is already associated with another Contact.
    RequestException: Unable to create contact, SMS is already associated with another Contact, duplicate_parameter
  • 🇮🇹Italy trickfun

    I think that with this condition, the webform handler is useless.
    I can't successfully submit 2 form from same email or phone number.
    If contact exists, webform must complete your submissions process.

    if createContact function (line 1143 of SendinblueApi.php) returns 'duplicate_parameter' code, no exceptions should be throw.

    $code = $json_decoded->code;
    
            if($code == 'duplicate_parameter'){
              //Unable to create contact, SMS or e-mail is already associated with another Contact
              //skip
              continue;
            }
    
    

    what do you thing?
    thank you

  • 🇮🇹Italy finex

    In my opinion this should be a configurable behavior. We should let the site owner to decide how to manage this situation. It should be an option on the handler settings: allow or deny submission when data is already present on Brevo. If the user is allowed no warning are shown, it should simply be logged on watchdog. With the deny option instead it should be printed a message and blocked the redirect.

  • 🇩🇪Germany Schoenef Unna

    For me (having the patch of #3424946 installed) it does not throw errors at all. I actually would like to send a error message to the user, if the contact is already in the list.

  • 🇩🇪Germany Schoenef Unna

    This patch could be a way to achieve this by configuration (just for the email)

Production build 0.71.5 2024