If you have a webform file component that is not required and the user submit the webform a Mysql Duplicate entry will appear.

Ex.

Duplicate entry '87-1274-17-0' for key 'PRIMARY' query: INSERT INTO webform_submitted_data (nid, sid, cid, no, data) VALUES (87, 1274, 17, '_old', '') 
Duplicate entry '87-1274-17-0' for key 'PRIMARY' query: INSERT INTO webform_submitted_data (nid, sid, cid, no, data) VALUES (87, 1274, 17, '_fid', '') 

That's because it tries to add _old & _fid to the no column that is numeric. Mysql converts them both into 0 and the duplicate entry error appears.

It works when a file is added but not when it's empty. But webform should not try to add _fid and _old to the database or am im wrong?

Comments

quicksketch’s picture

Yeah, _fid and _old should be excluded entirely which should fix that problem.

quicksketch’s picture

Version: 6.x-3.x-dev » 6.x-3.6
Priority: Major » Normal
Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.