It appears that whenever a user submits a form having selected an option from a non-mandatory select list component, webform attempts to populate {webform_submitted_data} with a row of empty data. This insert fails because of the non-unique index on (nid, sid, cid, no). This generates, for example, the following php error (sql warning):
User warning: Duplicate entry '1370286-7175-15-0' for key 'PRIMARY' query: INSERT INTO webform_submitted_data (nid, sid, cid, no, data) VALUES (1370286, 7175, 15, '0', '') in _db_query() (line 148 of /var/www/release_108.0/includes/database.mysql.inc).
Does this occur by design? If not, I'll dig further to see if I can provide more information. If so, I would question this approach, or at least suggest suppression of the error messages.
Thanks for a very useful module, by the way!
Comments
Comment #1
vernond commentedNope, that certainly isn't designed behaviour, nor can I replicate the error on my local.
Are you doing anything funky with the submission presave hook or somesuch by any chance?
Comment #2
dwightaspinwall commentedThanks for the information. I'll dig deeper and see if funkiness prevails.
Comment #3
quicksketchI can't reproduce this problem either. Does this happen on all forms on your site? We'll probably need instructions on how to reproduce the problem (from a fresh install of Drupal preferably) to provide much help here.
Comment #4
quicksketch