View Issue Details

This issue affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
20684Bug reportsStatisticspublic2026-09-13 22:10
ReporterFreda Assigned Toc_schmitz  
PrioritynoneSeveritypartial_block 
Status closedResolutionfixed 
Product Version7.0.x 
Summary20684: Statistics returns HTTP 500 with "Show text responses inline" for Multiple short text questions
Description

When generating Statistics for a survey containing a Multiple short text (Q) question, enabling "Show text responses inline" causes the Statistics request to fail with an HTTP 500 error.
The generated SQL uses an incorrect response-table column name. An additional Q is prepended to the actual column name.

For example, the actual response-table column is:

Q2412_S2419

but Statistics generates:

QQ2412_S2419

which results in:

CDbException:
CDbCommand failed to execute the SQL statement:
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'QQ2412_S2419' in 'WHERE'

The SQL statement executed was:
SELECT * FROM lime_responses_576182 WHERE QQ2412_S2419 != ''

Steps To Reproduce

Steps to reproduce

Create a new survey.
Add a Multiple short text question (type Q).
Add one or more subquestions.
Activate the survey and submit at least one response.
Open Statistics.
Enable "Show text responses inline".(See the attached settings screenshot)
Generate the statistics (pdf or excel).

Expected result

Statistics should be generated successfully and the text responses of the Multiple short text question should be displayed inline.

Actual result

The Statistics request fails with HTTP 500.

The server log contains an SQL error similar to:

Unknown column 'QQ2412_S2419' in 'WHERE'

The actual response-table column is:

Q2412_S2419

Additional findings

The issue can be reproduced specifically with Multiple short text (Q) questions.

The relevant code path in application/helpers/admin/statistics_helper.php handles Multiple short text together with the other text question types:

elseif ($outputs['qtype'] == Question::QT_S_SHORT_FREE_TEXT
|| $outputs['qtype'] == Question::QT_U_HUGE_FREE_TEXT
|| $outputs['qtype'] == Question::QT_T_LONG_FREE_TEXT
|| $outputs['qtype'] == Question::QT_Q_MULTIPLE_SHORT_TEXT)

When showtextinline is enabled, it calls:

$result2 = $this->_listcolumn($surveyid, $sColumnName);

The malformed column name appears to be introduced somewhere in this Statistics / _listcolumn() code path.

TagsNo tags attached.
Attached Files
Bug heat6
Complete LimeSurvey version number (& build)7.0.15
I will donate to the project if issue is resolvedNo
Browser
Database type & version.
Server OS (if known)
Webserver software & version (if known)
PHP Version.
Git branch / Pull Request URLN/A

Relationships

related to 20579 closedc_schmitz Statistics can't be exported 

Users monitoring this issue

There are no users monitoring this issue.

Activities

eusweisker

eusweisker

2026-09-11 11:23

manager   ~85673

After further investigation, the issue occurs as a consequence of combination of 3 Statistics options:
Output format: PDF/Excel
View summary of all available fields: On
Show text responses inline: On

c_schmitz

c_schmitz

2026-09-11 17:21

administrator   ~85675

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

LimeBot

LimeBot

2026-09-13 22:10

administrator   ~85692

Fixed in Release 7.1.0+260913

Related Changesets

LimeSurvey: master 0a547755

2026-09-11 17:21

c_schmitz


Details Diff
Fixed issue 20684: Statistics returns error with "Show text responses inline" for Multiple short text questions Affected Issues
20684
mod - application/helpers/admin/statistics_helper.php Diff File

Issue History

Date Modified Username Field Change
2026-09-11 09:43 Freda New Issue
2026-09-11 09:43 Freda File Added: Screenshot 2026-09-11 at 09.35.59.png
2026-09-11 09:43 Freda File Added: Screenshot 2026-09-11 at 09.35.46.png
2026-09-11 09:43 Freda File Added: survey_archive_996395.lsa
2026-09-11 09:43 Freda Relationship added related to 20579
2026-09-11 11:23 eusweisker Assigned To => eusweisker
2026-09-11 11:23 eusweisker Status new => confirmed
2026-09-11 11:23 eusweisker Complete LimeSurvey version number (& build) . => 7.0.15
2026-09-11 11:23 eusweisker Note Added: 85673
2026-09-11 11:23 eusweisker Bug heat 0 => 2
2026-09-11 17:21 c_schmitz Changeset attached => LimeSurvey master 0a547755
2026-09-11 17:21 c_schmitz Note Added: 85675
2026-09-11 17:21 c_schmitz Assigned To eusweisker => c_schmitz
2026-09-11 17:21 c_schmitz Status confirmed => resolved
2026-09-11 17:21 c_schmitz Resolution open => fixed
2026-09-11 17:21 c_schmitz Bug heat 2 => 4
2026-09-13 22:10 LimeBot Note Added: 85692
2026-09-13 22:10 LimeBot Status resolved => closed
2026-09-13 22:10 LimeBot Bug heat 4 => 6