View Issue Details

This bug affects 1 person(s).
 14
IDProjectCategoryView StatusLast Update
06644Bug reportsStatisticspublic2012-10-24 14:16
Reporterdocl Assigned Tomdekker  
PrioritynormalSeverityblock 
Status closedResolutionfixed 
Product Version2.00+ 
Fixed in Version2.00+ 
Summary06644: Creating PDF statistics containing questions of numeric value type results in internal server error 500
Description

When creating PDF statistics of a survey it crashes with an internal server error 500.

I have isolated the culpritt to questions of "numeric value type" - when these are excluded from the statistics the error DOES NOT occur.

Selecting a max and min value for these questions in the statistics does not solve the problem.

HTML statistics works without errors for the same surveys..

Steps To Reproduce

Create survey that contains numeric value type questions.
Create PDF statistics.

TagsNo tags attached.
Attached Files
survey_bug_example.lsa (3,351 bytes)
Bug heat14
Complete LimeSurvey version number (& build)121002
I will donate to the project if issue is resolvedNo
Browser
Database type & versionMySQL 5.1.63-0+squeeze1
Server OS (if known)Linux
Webserver software & version (if known)Apache/2.2.16 (Debian)
PHP Version5.3.17

Relationships

has duplicate 06730 closedc_schmitz Statistics report as Excel not working 

Users monitoring this issue

docl

Activities

docl

docl

2012-10-04 16:40

reporter   ~21034

Sorry.. "numeric value type" is correctly called "Type: Numerical input"

c_schmitz

c_schmitz

2012-10-05 09:15

administrator   ~21049

Can you please attach a small sample survey as .lss or lsa file to demonstrate the issue?

docl

docl

2012-10-06 15:33

reporter   ~21096

Sure thing.
The survey includes two questions.
If you try to create pdf stats for both questions the pdf creation fails with error 500, if you create pdf stats for only the date question the pdf is successfully generated.

c_schmitz

c_schmitz

2012-10-09 13:37

administrator   ~21125

Looks like PDF and Excel statistics are completely borked, currently. It will take some time to fix that.

docl

docl

2012-10-09 23:18

reporter   ~21148

Last edited: 2012-10-11 14:42

Thanks for taking the time to investigate this problem..
Regarding pdf (and excel) statistics the error only occurs when a survey includes "Numerical input" questions, and when these are included for the stats.. It makes me wonder what in the pdf/excel generating code is special for this specific question type - and why it works with html.
I assume all calculations (sum/average etc) for numerical inputs are done before passing it to the pdf/xls module, and the same calculations are used no matter if the output is html, pdf or xls..? If so it has to be a rather simple parsing error for the pdf/xls code generation for this input type.. (however I'm no expert on the subject :-))
I have tried to find the file/lines that create the pdf stats specifically for numerical input questions, but have not succeeded..Any hints?

EDIT: I just found out that not only is the export statistics part not functioning - the export results to excel option does not work either which is obviously a huge problem - I will create another bug concerning this..

mdekker

mdekker

2012-10-22 09:04

reporter   ~21521

For me the regular result export to excel and pdf is working, also when a numerical question is present. I will focus on the statitics export.

If in admin/export/exportresults you have issues with exporting in the current version (121019) please attach a short sample survey that shows the problem.

mdekker

mdekker

2012-10-22 10:05

reporter   ~21523

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=9967

mdekker

mdekker

2012-10-22 14:22

reporter   ~21530

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=9970

mdekker

mdekker

2012-10-23 09:51

reporter   ~21554

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=9980

mdekker

mdekker

2012-10-23 09:53

reporter   ~21555

Multiple numerical question caused some sort of infinite loop. All should be working now.

c_schmitz

c_schmitz

2012-10-24 14:16

administrator   ~21606

LimeSurvey 2.00+ Build 121024 released. Please update.

Related Changesets

LimeSurvey: master 75e0e0ad

2012-10-22 03:04

mdekker


Details Diff
Partial fix 06644: Excel export of statistics should be working again (PDF still to be fixed) Affected Issues
06644
mod - application/controllers/Statistics_userController.php Diff File
mod - application/controllers/admin/remotecontrol.php Diff File
mod - application/controllers/admin/statistics.php Diff File
mod - application/helpers/admin/statistics_helper.php Diff File
add - protected/tests/unit/bootstrap.php Diff File
add - protected/tests/unit/common_helperTest.php Diff File

LimeSurvey: master 0e416bb0

2012-10-22 07:20

mdekker


Details Diff
Fixed 06644: Statistics export to both PDF and Excel is working again
dev: on my system the header-logo statistics.png crashes gd-library so i left a comment. If more people need it we could build a switch
Affected Issues
06644
mod - application/helpers/admin/exportresults_helper.php Diff File
mod - application/helpers/admin/statistics_helper.php Diff File
mod - application/libraries/admin/pdf.php Diff File
rm - application/third_party/tcpdf/extensiontcpdf.php Diff
rm - application/third_party/tcpdf/mypdf.php Diff

LimeSurvey: master e9e67643

2012-10-23 02:49

mdekker


Details Diff
Fixed 06644: Creating PDF statistics containing questions of multi numeric value type cause infinite loop Affected Issues
06644
mod - application/helpers/admin/statistics_helper.php Diff File

Issue History

Date Modified Username Field Change
2012-10-04 15:27 docl New Issue
2012-10-04 15:28 docl Issue Monitored: docl
2012-10-04 16:40 docl Note Added: 21034
2012-10-05 09:15 c_schmitz Note Added: 21049
2012-10-05 09:15 c_schmitz Assigned To => c_schmitz
2012-10-05 09:15 c_schmitz Status new => feedback
2012-10-06 15:30 docl File Added: survey_bug_example.lsa
2012-10-06 15:33 docl Note Added: 21096
2012-10-06 15:33 docl Status feedback => assigned
2012-10-09 13:37 c_schmitz Note Added: 21125
2012-10-09 23:18 docl Note Added: 21148
2012-10-11 14:42 docl Note Edited: 21148
2012-10-19 08:31 c_schmitz Assigned To c_schmitz =>
2012-10-19 08:31 c_schmitz Status assigned => new
2012-10-19 14:57 c_schmitz Relationship added has duplicate 06730
2012-10-22 09:00 mdekker Assigned To => mdekker
2012-10-22 09:00 mdekker Status new => assigned
2012-10-22 09:04 mdekker Note Added: 21521
2012-10-22 10:05 mdekker Changeset attached => LimeSurvey master 75e0e0ad
2012-10-22 10:05 mdekker Note Added: 21523
2012-10-22 10:05 mdekker Resolution open => fixed
2012-10-22 14:22 mdekker Changeset attached => LimeSurvey master 0e416bb0
2012-10-22 14:22 mdekker Note Added: 21530
2012-10-23 09:51 mdekker Changeset attached => LimeSurvey master e9e67643
2012-10-23 09:51 mdekker Note Added: 21554
2012-10-23 09:53 mdekker Note Added: 21555
2012-10-23 09:53 mdekker Status assigned => closed
2012-10-23 09:53 mdekker Fixed in Version => 2.00+
2012-10-23 09:53 mdekker Status closed => feedback
2012-10-23 09:53 mdekker Resolution fixed => reopened
2012-10-23 09:53 mdekker Status feedback => resolved
2012-10-23 09:53 mdekker Resolution reopened => fixed
2012-10-24 14:16 c_schmitz Note Added: 21606
2012-10-24 14:16 c_schmitz Status resolved => closed