View Issue Details

This bug affects 1 person(s).
 0
IDProjectCategoryView StatusLast Update
17780Bug reportsStatisticspublic2021-12-07 08:10
Reporterrjpinto Assigned ToDenisChenu  
PrioritynoneSeveritypartial_block 
Status closedResolutionduplicate 
Product Version5.2.x 
Fixed in Version5.2.x 
Summary17780: Statistics fail with an internal error
Description

Clicking on the statistics for the survey produces a error 500 .
CDbCommand failed to execute the SQL statement: SQLSTATE[42601]: Syntax error: 7 ERROR: syntax error at or near "group"

Looking in the postgresql database log I can see that there is a quotes problem in the order by:
SELECT
"t"."qid" AS "t0_c0",
"t"."parent_qid" AS "t0_c1",
"t"."sid" AS "t0_c2",
"t"."gid" AS "t0_c3",
"t"."type" AS "t0_c4",
"t"."title" AS "t0_c5",
"t"."preg" AS "t0_c6",
"t"."other" AS "t0_c7",
"t"."mandatory" AS "t0_c8",
"t"."question_order" AS "t0_c9",
"t"."scale_id" AS "t0_c10",
"t"."same_default" AS "t0_c11",
"t"."relevance" AS "t0_c12",
"t"."modulename" AS "t0_c13",
"t"."encrypted" AS "t0_c14",
"t"."question_theme_name" AS "t0_c15",
"group"."gid" AS "t1_c0",
"group"."sid" AS "t1_c1",
"group"."group_order" AS "t1_c2",
"group"."randomization_group" AS "t1_c3",
"group"."grelevance" AS "t1_c4"
FROM "lime_questions" "t"
LEFT OUTER JOIN "lime_groups" "group" ON ("t"."gid"="group"."gid")
WHERE ((parent_qid = 0) AND (t.sid=499767)) ORDER BY group.group_order,question_order

For this query to run it should be using quotes:
ORDER BY "group"."group_order",question_order

Steps To Reproduce

Steps to reproduce

Click on the statistics of any running survey

Expected result

Should show us the statistics

Actual result

Database query error returns a HTTP 500 error

TagsNo tags attached.
Bug heat0
Complete LimeSurvey version number (& build)5.2.4+211129
I will donate to the project if issue is resolvedNo
Browser
Database type & versionPostgresql 12.9
Server OS (if known)Ubuntu Server 20.04
Webserver software & version (if known)
PHP Version7.4.3

Relationships

duplicate of 17777 closedDenisChenu PGSQL CDbCommand issue ins statistics 

Users monitoring this issue

There are no users monitoring this issue.

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2021-12-06 20:28 rjpinto New Issue
2021-12-07 08:10 DenisChenu Relationship added duplicate of 17777
2021-12-07 08:10 DenisChenu Assigned To => DenisChenu
2021-12-07 08:10 DenisChenu Status new => closed
2021-12-07 08:10 DenisChenu Resolution open => duplicate
2021-12-07 08:10 DenisChenu Fixed in Version => 5.2.x