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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

trout_adrian_beyerle created an issue. See original summary.

Liam Morland’s picture

I am able to add conditionals on my forms. I suggest adding debugging output to the code to see if it is being run twice.

Liam Morland’s picture

Title: Webform conditional, integrity constraint violatino » Webform conditional, integrity constraint violation
Liam Morland’s picture

Status: Active » Postponed (maintainer needs more info)

Can you provide steps to reproduce the problem?

Liam Morland’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

If you can provide steps to reproduce the problem, please re-open.