Integrity Constraint Violation

Created on 16 November 2023, about 1 year ago

When submitting a webform after an error, I'm seeing the following errors (and on the front end, the form appears to have failed to submit):

Type: webform_submission
Drupal\Core\Database\IntegrityConstraintViolationException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '5fe64364-0881-4489-b865-[redacted]' for key 'webform_submission_field__uuid__value': INSERT INTO "webform_submission" ("webform_id", "uuid", "langcode", "serial", "token", "uri", "created", "completed", "changed", "in_draft", "current_page", "remote_addr", "uid", "entity_type", "entity_id", "locked", "sticky", "notes") VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7, :db_insert_placeholder_8, :db_insert_placeholder_9, :db_insert_placeholder_10, :db_insert_placeholder_11, :db_insert_placeholder_12, :db_insert_placeholder_13, :db_insert_placeholder_14, :db_insert_placeholder_15, :db_insert_placeholder_16, :db_insert_placeholder_17); Array ( [:db_insert_placeholder_0] => pay [:db_insert_placeholder_1] => 5fe64364-0881-4489-b865-[redacted] [:db_insert_placeholder_2] => en [:db_insert_placeholder_3] => 11 [:db_insert_placeholder_4] => [redacted] [:db_insert_placeholder_5] => /form/pay?name%5Bfirst%5D=test&name%5Blast%5D=test&address%5Baddress%5D=test&address%5Bcity%5D=test&address%5Bstate_province%5D=California&address%5Bpostal_code%5D=test&phone=2135551212&email=test%40test.com&invoice=9999& [:db_insert_placeholder_6] => 1700148642 [:db_insert_placeholder_7] => 1700148662 [:db_insert_placeholder_8] => 1700148662 [:db_insert_placeholder_9] => 0 [:db_insert_placeholder_10] => webform_confirmation [:db_insert_placeholder_11] => [redacted] [:db_insert_placeholder_12] => 0 [:db_insert_placeholder_13] => [:db_insert_placeholder_14] => [:db_insert_placeholder_15] => 0 [:db_insert_placeholder_16] => 0 [:db_insert_placeholder_17] => ) in Drupal\mysql\Driver\Database\mysql\ExceptionHandler->handleExecutionException() (line 43 of /var/www/vhost/greatmatter.com/html/core/modules/mysql/src/Driver/Database/mysql/ExceptionHandler.php).

and
Type: php
Drupal\Core\Entity\EntityStorageException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '5fe64364-0881-4489-b865-[redacted]' for key 'webform_submission_field__uuid__value': INSERT INTO "webform_submission" ("webform_id", "uuid", "langcode", "serial", "token", "uri", "created", "completed", "changed", "in_draft", "current_page", "remote_addr", "uid", "entity_type", "entity_id", "locked", "sticky", "notes") VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7, :db_insert_placeholder_8, :db_insert_placeholder_9, :db_insert_placeholder_10, :db_insert_placeholder_11, :db_insert_placeholder_12, :db_insert_placeholder_13, :db_insert_placeholder_14, :db_insert_placeholder_15, :db_insert_placeholder_16, :db_insert_placeholder_17); Array ( [:db_insert_placeholder_0] => pay [:db_insert_placeholder_1] => 5fe64364-0881-4489-b865-[redacted] [:db_insert_placeholder_2] => en [:db_insert_placeholder_3] => 11 [:db_insert_placeholder_4] => [redacted] [:db_insert_placeholder_5] => /form/pay?name%5Bfirst%5D=test&name%5Blast%5D=test&address%5Baddress%5D=test&address%5Bcity%5D=test&address%5Bstate_province%5D=California&address%5Bpostal_code%5D=test&phone=2135551212&email=test%40test.com&invoice=9999& [:db_insert_placeholder_6] => 1700148642 [:db_insert_placeholder_7] => 1700148662 [:db_insert_placeholder_8] => 1700148662 [:db_insert_placeholder_9] => 0 [:db_insert_placeholder_10] => webform_confirmation [:db_insert_placeholder_11] => [redacted] [:db_insert_placeholder_12] => 0 [:db_insert_placeholder_13] => [:db_insert_placeholder_14] => [:db_insert_placeholder_15] => 0 [:db_insert_placeholder_16] => 0 [:db_insert_placeholder_17] => ) in Drupal\Core\Entity\Sql\SqlContentEntityStorage->save() (line 817 of /var/www/vhost/greatmatter.com/html/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php).

When I remove the payment field, the error does not trigger. I do *not* believe it is an example of this:
https://www.drupal.org/project/webform/issues/3001661 πŸ› Ajax integrity constraint on uuid with autosave and ajax-compatible confirmation type Needs review

πŸ› Bug report
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States greatmatter

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

Comments & Activities

Production build 0.71.5 2024