I seem to be having an issue with downloading webform reports. I see the batch process occur, but when it redirects me to download the file I receive a white screen.
In the logs I am seeing the following errors:
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'sid' cannot be null: INSERT INTO {webform_last_download} (nid, uid, sid, requested) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3); Array ( [:db_insert_placeholder_0] => 25501 [:db_insert_placeholder_1] => 1 [:db_insert_placeholder_2] => [:db_insert_placeholder_3] => 1410275402 ) in webform_results_download() (line 1071 of /sites/all/modules/webform/includes/webform.report.inc).
Notice: Undefined index: last_sid in webform_results_batch_results() (line 1236 of /sites/all/modules/webform/includes/webform.report.inc).
Not sure if anyone else has experienced this...
Running Drupal 7.31 and webform 7.x-4.0
Comment | File | Size | Author |
---|---|---|---|
#5 | webform-fnf_no_submissions-2335587-5.patch | 4.15 KB | DanChadwick |
Comments
Comment #1
robdubparker CreditAttribution: robdubparker commentedComment #2
DanChadwick CreditAttribution: DanChadwick commented@rp121 -- Is this really a WSOD, or is it really a redirect to a file that wasn't created (file not found).
I was able to reproduce a problem (maybe the same problem?) by downloading all the submissions and then downloading the new submissions. Since there aren't any new submissions, the PDO exception happens and not file is created.
Comment #3
robdubparker CreditAttribution: robdubparker commentedThanks @DanChadwick. I believe it may be a combination of what you are describing... I initially get the whitescreen, but if I reload the browser (same url), it tells me the file cannot be found. I also noticed that this happens only to forms that don't have any submissions (which I believe you experienced as well). So, the good news is that forms which contain results seem to work fine.
Comment #4
DanChadwick CreditAttribution: DanChadwick commentedComment #5
DanChadwick CreditAttribution: DanChadwick commentedCommitted to 7.x-4.x and 8.x.
Background. It is not easy to guarantee that the counts used to generate the form and enable options will be accurate when the form is actually submitted. Additional submissions may be added or deleted while the form is being presented to the administrator, or another user may download submissions. Therefore the code must handle range specifications where it turns out that no records match.
There are four related sub-issues here.
The result is is a file with a header but no data, which alleviates the File Not Found.
Comment #8
DanChadwick CreditAttribution: DanChadwick commented