Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Please help fellow Drupal community!
On saving a conditional, I receive unique key constraint error and the query is not run.
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '144-0' for key 'PRIMARY': INSERT INTO {webform_conditional} (nid, rgid, weight) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2); Array ( [:db_insert_placeholder_0] => 144 [:db_insert_placeholder_1] => 0 [:db_insert_placeholder_2] => -1 ) in drupal_write_record() (line 7376 of /Users/adrian/Sites/WEHI/wehi.dev/includes/common.inc).
The webform_conditional database table is empty, so should have no issues saving the conditional.
Screenshot attached.
Comment | File | Size | Author |
---|---|---|---|
Screen Shot 2017-02-15 at 5.44.53 PM.png | 95.17 KB | trout_adrian_beyerle |
Comments
Comment #2
Liam MorlandI am able to add conditionals on my forms. I suggest adding debugging output to the code to see if it is being run twice.
Comment #3
Liam MorlandComment #4
Liam MorlandCan you provide steps to reproduce the problem?
Comment #5
Liam MorlandIf you can provide steps to reproduce the problem, please re-open.