Hello,
I successfully cloned a simple Webform (textfields only) with a fresh D7 install and Webform 7.x-3.6. Unfortunately, while trying to clone a more complex Webform (texfields, select lists, radio buttons, fieldsets...) I came across this error :
PDOException : SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1' for key 'PRIMARY': INSERT INTO {webform_validation_rule} (ruleid, rulename, nid, validator, data, error_message) 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); Array ( [:db_insert_placeholder_0] => 1 [:db_insert_placeholder_1] => Numeric values only [:db_insert_placeholder_2] => 8 [:db_insert_placeholder_3] => numeric [:db_insert_placeholder_4] => 0 [:db_insert_placeholder_5] => ) in drupal_write_record() (lin 6776 in /www/drupal/includes/common.inc).
Thank you for your help
Comments
Comment #1
jonaswouters CreditAttribution: jonaswouters commentedsubscribing
Comment #2
pwolanin CreditAttribution: pwolanin commentedWebform has in the past cleaned up up its data so that cloning was possible. Look like the cloning may not be really possible in D7 if you need the final nid at the time the clone is made.
Comment #3
quicksketchI'm betting this is not an issue with Webform, but the Webform Validation module. Webform should already make sure that components don't run into this integrity constraint when inserting into its own tables.
Comment #4
anavarre@quicksketch
You are absolutely right. As soon as I deactivate the Webform Validation module, the node is cloned successfully.
Comment #5
cschenker CreditAttribution: cschenker commented@qucksketch
Thank's for that advice - it worked for me too! Saved me heaps of time though! :)
Comment #6
svendecabooterComment #7
svendecabooterThe PDOException error has been fixed now.