View Issue Details

This issue affects 1 person(s).
 8
IDProjectCategoryView StatusLast Update
20666Bug reportsDatabase designpublic2026-09-02 17:53
Reporterlavamind Assigned To 
PrioritynoneSeveritycrash 
Status newResolutionopen 
Summary20666: Group with 2 questions and condition crashes with SQL error
Description

Using a survey with 1 question group and 2 questions with 1 condition crashes the survey.

Steps To Reproduce

Steps to reproduce

Create a question group with a list(radio) question and an advanced ranking question, and a condition.

Import the attached LSG file into a question group, it should reproduce the error.

Expected result

Open survey, answer questions.

Actual result

Follow the Next link on the title page causes a crash with the following error message:

CDbException

CDbCommand failed to execute the SQL statement: SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for type integer: ""
LINE 1: SELECT * FROM "lime_questions" "t" WHERE qid = '' LIMIT 1
^
TagsNo tags attached.
Bug heat8
Complete LimeSurvey version number (& build)7.0.12+260833
I will donate to the project if issue is resolvedNo
Story point estimate0
Browser
Database type & versionPostgreSQL 17.11
Server OS (if known)
Webserver software & version (if known)
PHP Version8.4.24

Users monitoring this issue

There are no users monitoring this issue.

Activities

lavamind

lavamind

2026-09-01 23:21

reporter   ~85543

limesurvey_group_196.lsg (18,596 bytes)   
<?xml version="1.0" encoding="UTF-8"?>
<document>
 <LimeSurveyDocType>Group</LimeSurveyDocType>
 <DBVersion>711</DBVersion>
 <languages>
  <language>en</language>
 </languages>
 <groups>
  <fields>
   <fieldname>gid</fieldname>
   <fieldname>sid</fieldname>
   <fieldname>group_order</fieldname>
   <fieldname>randomization_group</fieldname>
   <fieldname>grelevance</fieldname>
  </fields>
  <rows>
   <row>
    <gid><![CDATA[196]]></gid>
    <sid><![CDATA[373693]]></sid>
    <group_order><![CDATA[1]]></group_order>
    <randomization_group/>
    <grelevance><![CDATA[1]]></grelevance>
   </row>
  </rows>
 </groups>
 <group_l10ns>
  <fields>
   <fieldname>id</fieldname>
   <fieldname>gid</fieldname>
   <fieldname>group_name</fieldname>
   <fieldname>description</fieldname>
   <fieldname>language</fieldname>
   <fieldname>sid</fieldname>
   <fieldname>group_order</fieldname>
   <fieldname>randomization_group</fieldname>
   <fieldname>grelevance</fieldname>
  </fields>
  <rows>
   <row>
    <id><![CDATA[316]]></id>
    <gid><![CDATA[196]]></gid>
    <group_name><![CDATA[My first question group]]></group_name>
    <description/>
    <language><![CDATA[en]]></language>
    <sid><![CDATA[373693]]></sid>
    <group_order><![CDATA[1]]></group_order>
    <randomization_group/>
    <grelevance><![CDATA[1]]></grelevance>
   </row>
  </rows>
 </group_l10ns>
 <questions>
  <fields>
   <fieldname>qid</fieldname>
   <fieldname>parent_qid</fieldname>
   <fieldname>sid</fieldname>
   <fieldname>gid</fieldname>
   <fieldname>type</fieldname>
   <fieldname>title</fieldname>
   <fieldname>preg</fieldname>
   <fieldname>other</fieldname>
   <fieldname>mandatory</fieldname>
   <fieldname>encrypted</fieldname>
   <fieldname>question_order</fieldname>
   <fieldname>scale_id</fieldname>
   <fieldname>same_default</fieldname>
   <fieldname>relevance</fieldname>
   <fieldname>question_theme_name</fieldname>
   <fieldname>modulename</fieldname>
   <fieldname>same_script</fieldname>
  </fields>
  <rows>
   <row>
    <qid><![CDATA[3361]]></qid>
    <parent_qid><![CDATA[0]]></parent_qid>
    <sid><![CDATA[373693]]></sid>
    <gid><![CDATA[196]]></gid>
    <type><![CDATA[L]]></type>
    <title><![CDATA[Q00]]></title>
    <other><![CDATA[N]]></other>
    <mandatory><![CDATA[N]]></mandatory>
    <encrypted><![CDATA[N]]></encrypted>
    <question_order><![CDATA[1]]></question_order>
    <scale_id><![CDATA[0]]></scale_id>
    <same_default><![CDATA[0]]></same_default>
    <relevance><![CDATA[1]]></relevance>
    <question_theme_name><![CDATA[listradio]]></question_theme_name>
    <same_script><![CDATA[0]]></same_script>
   </row>
   <row>
    <qid><![CDATA[3364]]></qid>
    <parent_qid><![CDATA[0]]></parent_qid>
    <sid><![CDATA[373693]]></sid>
    <gid><![CDATA[196]]></gid>
    <type><![CDATA[R]]></type>
    <title><![CDATA[Q001]]></title>
    <other><![CDATA[N]]></other>
    <mandatory><![CDATA[N]]></mandatory>
    <encrypted><![CDATA[N]]></encrypted>
    <question_order><![CDATA[2]]></question_order>
    <scale_id><![CDATA[0]]></scale_id>
    <same_default><![CDATA[0]]></same_default>
    <relevance><![CDATA[((Q00.NAOK == "A002"))]]></relevance>
    <question_theme_name><![CDATA[ranking_advanced]]></question_theme_name>
    <same_script><![CDATA[0]]></same_script>
   </row>
  </rows>
 </questions>
 <subquestions>
  <fields>
   <fieldname>qid</fieldname>
   <fieldname>parent_qid</fieldname>
   <fieldname>sid</fieldname>
   <fieldname>gid</fieldname>
   <fieldname>type</fieldname>
   <fieldname>title</fieldname>
   <fieldname>preg</fieldname>
   <fieldname>other</fieldname>
   <fieldname>mandatory</fieldname>
   <fieldname>encrypted</fieldname>
   <fieldname>question_order</fieldname>
   <fieldname>scale_id</fieldname>
   <fieldname>same_default</fieldname>
   <fieldname>relevance</fieldname>
   <fieldname>question_theme_name</fieldname>
   <fieldname>modulename</fieldname>
   <fieldname>same_script</fieldname>
  </fields>
  <rows>
   <row>
    <qid><![CDATA[3365]]></qid>
    <parent_qid><![CDATA[3364]]></parent_qid>
    <sid><![CDATA[373693]]></sid>
    <gid><![CDATA[196]]></gid>
    <type><![CDATA[R]]></type>
    <title><![CDATA[SQ001]]></title>
    <other><![CDATA[N]]></other>
    <encrypted><![CDATA[N]]></encrypted>
    <question_order><![CDATA[0]]></question_order>
    <scale_id><![CDATA[0]]></scale_id>
    <same_default><![CDATA[0]]></same_default>
    <relevance><![CDATA[1]]></relevance>
    <same_script><![CDATA[0]]></same_script>
   </row>
   <row>
    <qid><![CDATA[3366]]></qid>
    <parent_qid><![CDATA[3364]]></parent_qid>
    <sid><![CDATA[373693]]></sid>
    <gid><![CDATA[196]]></gid>
    <type><![CDATA[R]]></type>
    <title><![CDATA[SQ002]]></title>
    <other><![CDATA[N]]></other>
    <encrypted><![CDATA[N]]></encrypted>
    <question_order><![CDATA[1]]></question_order>
    <scale_id><![CDATA[0]]></scale_id>
    <same_default><![CDATA[0]]></same_default>
    <relevance><![CDATA[1]]></relevance>
    <same_script><![CDATA[0]]></same_script>
   </row>
  </rows>
 </subquestions>
 <question_l10ns>
  <fields>
   <fieldname>id</fieldname>
   <fieldname>qid</fieldname>
   <fieldname>question</fieldname>
   <fieldname>help</fieldname>
   <fieldname>script</fieldname>
   <fieldname>language</fieldname>
  </fields>
  <rows>
   <row>
    <id><![CDATA[6845]]></id>
    <qid><![CDATA[3365]]></qid>
    <question><![CDATA[<p>a</p>]]></question>
    <help/>
    <script/>
    <language><![CDATA[en]]></language>
   </row>
   <row>
    <id><![CDATA[6841]]></id>
    <qid><![CDATA[3361]]></qid>
    <question/>
    <help/>
    <script/>
    <language><![CDATA[en]]></language>
   </row>
   <row>
    <id><![CDATA[6846]]></id>
    <qid><![CDATA[3366]]></qid>
    <question><![CDATA[<p>b</p>]]></question>
    <help/>
    <script/>
    <language><![CDATA[en]]></language>
   </row>
   <row>
    <id><![CDATA[6844]]></id>
    <qid><![CDATA[3364]]></qid>
    <question><![CDATA[<p>which day</p>]]></question>
    <help/>
    <script/>
    <language><![CDATA[en]]></language>
   </row>
  </rows>
 </question_l10ns>
 <answers>
  <fields>
   <fieldname>aid</fieldname>
   <fieldname>qid</fieldname>
   <fieldname>code</fieldname>
   <fieldname>sortorder</fieldname>
   <fieldname>assessment_value</fieldname>
   <fieldname>scale_id</fieldname>
  </fields>
  <rows>
   <row>
    <aid><![CDATA[11097]]></aid>
    <qid><![CDATA[3361]]></qid>
    <code><![CDATA[A001]]></code>
    <sortorder><![CDATA[0]]></sortorder>
    <assessment_value><![CDATA[0]]></assessment_value>
    <scale_id><![CDATA[0]]></scale_id>
   </row>
   <row>
    <aid><![CDATA[11098]]></aid>
    <qid><![CDATA[3361]]></qid>
    <code><![CDATA[A002]]></code>
    <sortorder><![CDATA[1]]></sortorder>
    <assessment_value><![CDATA[0]]></assessment_value>
    <scale_id><![CDATA[0]]></scale_id>
   </row>
  </rows>
 </answers>
 <answer_l10ns>
  <fields>
   <fieldname>id</fieldname>
   <fieldname>aid</fieldname>
   <fieldname>answer</fieldname>
   <fieldname>language</fieldname>
  </fields>
  <rows>
   <row>
    <id><![CDATA[37588]]></id>
    <aid><![CDATA[11097]]></aid>
    <answer><![CDATA[<p>a</p>]]></answer>
    <language><![CDATA[en]]></language>
   </row>
   <row>
    <id><![CDATA[37589]]></id>
    <aid><![CDATA[11098]]></aid>
    <answer><![CDATA[<p>b</p>]]></answer>
    <language><![CDATA[en]]></language>
   </row>
  </rows>
 </answer_l10ns>
 <conditions>
  <fields>
   <fieldname>cid</fieldname>
   <fieldname>qid</fieldname>
   <fieldname>cqid</fieldname>
   <fieldname>cfieldname</fieldname>
   <fieldname>method</fieldname>
   <fieldname>value</fieldname>
   <fieldname>scenario</fieldname>
  </fields>
  <rows>
   <row>
    <cid><![CDATA[271]]></cid>
    <qid><![CDATA[3364]]></qid>
    <cqid><![CDATA[3361]]></cqid>
    <cfieldname><![CDATA[Q3361]]></cfieldname>
    <method><![CDATA[==]]></method>
    <value><![CDATA[A002]]></value>
    <scenario><![CDATA[1]]></scenario>
   </row>
  </rows>
 </conditions>
 <question_attributes>
  <fields>
   <fieldname>qid</fieldname>
   <fieldname>attribute</fieldname>
   <fieldname>value</fieldname>
   <fieldname>language</fieldname>
  </fields>
  <rows>
   <row>
    <qid><![CDATA[3361]]></qid>
    <attribute><![CDATA[answer_order]]></attribute>
    <value><![CDATA[normal]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[3361]]></qid>
    <attribute><![CDATA[array_filter]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[3361]]></qid>
    <attribute><![CDATA[array_filter_exclude]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[3361]]></qid>
    <attribute><![CDATA[array_filter_style]]></attribute>
    <value><![CDATA[0]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[3361]]></qid>
    <attribute><![CDATA[cssclass]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[3361]]></qid>
    <attribute><![CDATA[display_columns]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[3361]]></qid>
    <attribute><![CDATA[em_validation_q]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[3361]]></qid>
    <attribute><![CDATA[em_validation_q_tip]]></attribute>
    <value/>
    <language><![CDATA[en]]></language>
   </row>
   <row>
    <qid><![CDATA[3361]]></qid>
    <attribute><![CDATA[hidden]]></attribute>
    <value><![CDATA[0]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[3361]]></qid>
    <attribute><![CDATA[hide_tip]]></attribute>
    <value><![CDATA[0]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[3361]]></qid>
    <attribute><![CDATA[image]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[3361]]></qid>
    <attribute><![CDATA[keep_codes_order]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[3361]]></qid>
    <attribute><![CDATA[other_comment_mandatory]]></attribute>
    <value><![CDATA[0]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[3361]]></qid>
    <attribute><![CDATA[other_numbers_only]]></attribute>
    <value><![CDATA[0]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[3361]]></qid>
    <attribute><![CDATA[other_position]]></attribute>
    <value><![CDATA[default]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[3361]]></qid>
    <attribute><![CDATA[other_position_code]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[3361]]></qid>
    <attribute><![CDATA[other_replace_text]]></attribute>
    <value/>
    <language><![CDATA[en]]></language>
   </row>
   <row>
    <qid><![CDATA[3361]]></qid>
    <attribute><![CDATA[page_break]]></attribute>
    <value><![CDATA[0]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[3361]]></qid>
    <attribute><![CDATA[printable_help]]></attribute>
    <value/>
    <language><![CDATA[en]]></language>
   </row>
   <row>
    <qid><![CDATA[3361]]></qid>
    <attribute><![CDATA[public_statistics]]></attribute>
    <value><![CDATA[0]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[3361]]></qid>
    <attribute><![CDATA[random_group]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[3361]]></qid>
    <attribute><![CDATA[scale_export]]></attribute>
    <value><![CDATA[0]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[3361]]></qid>
    <attribute><![CDATA[statistics_graphtype]]></attribute>
    <value><![CDATA[0]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[3361]]></qid>
    <attribute><![CDATA[statistics_showgraph]]></attribute>
    <value><![CDATA[1]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[3361]]></qid>
    <attribute><![CDATA[time_limit]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[3361]]></qid>
    <attribute><![CDATA[time_limit_action]]></attribute>
    <value><![CDATA[1]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[3361]]></qid>
    <attribute><![CDATA[time_limit_countdown_message]]></attribute>
    <value/>
    <language><![CDATA[en]]></language>
   </row>
   <row>
    <qid><![CDATA[3361]]></qid>
    <attribute><![CDATA[time_limit_disable_next]]></attribute>
    <value><![CDATA[0]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[3361]]></qid>
    <attribute><![CDATA[time_limit_disable_prev]]></attribute>
    <value><![CDATA[0]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[3361]]></qid>
    <attribute><![CDATA[time_limit_message]]></attribute>
    <value/>
    <language><![CDATA[en]]></language>
   </row>
   <row>
    <qid><![CDATA[3361]]></qid>
    <attribute><![CDATA[time_limit_message_delay]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[3361]]></qid>
    <attribute><![CDATA[time_limit_message_style]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[3361]]></qid>
    <attribute><![CDATA[time_limit_timer_style]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[3361]]></qid>
    <attribute><![CDATA[time_limit_warning]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[3361]]></qid>
    <attribute><![CDATA[time_limit_warning_2]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[3361]]></qid>
    <attribute><![CDATA[time_limit_warning_2_display_time]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[3361]]></qid>
    <attribute><![CDATA[time_limit_warning_2_message]]></attribute>
    <value/>
    <language><![CDATA[en]]></language>
   </row>
   <row>
    <qid><![CDATA[3361]]></qid>
    <attribute><![CDATA[time_limit_warning_2_style]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[3361]]></qid>
    <attribute><![CDATA[time_limit_warning_display_time]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[3361]]></qid>
    <attribute><![CDATA[time_limit_warning_message]]></attribute>
    <value/>
    <language><![CDATA[en]]></language>
   </row>
   <row>
    <qid><![CDATA[3361]]></qid>
    <attribute><![CDATA[time_limit_warning_style]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[3364]]></qid>
    <attribute><![CDATA[array_filter]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[3364]]></qid>
    <attribute><![CDATA[array_filter_exclude]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[3364]]></qid>
    <attribute><![CDATA[array_filter_style]]></attribute>
    <value><![CDATA[0]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[3364]]></qid>
    <attribute><![CDATA[choice_title]]></attribute>
    <value/>
    <language><![CDATA[en]]></language>
   </row>
   <row>
    <qid><![CDATA[3364]]></qid>
    <attribute><![CDATA[cssclass]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[3364]]></qid>
    <attribute><![CDATA[em_validation_q]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[3364]]></qid>
    <attribute><![CDATA[em_validation_q_tip]]></attribute>
    <value/>
    <language><![CDATA[en]]></language>
   </row>
   <row>
    <qid><![CDATA[3364]]></qid>
    <attribute><![CDATA[hidden]]></attribute>
    <value><![CDATA[0]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[3364]]></qid>
    <attribute><![CDATA[hide_tip]]></attribute>
    <value><![CDATA[0]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[3364]]></qid>
    <attribute><![CDATA[image]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[3364]]></qid>
    <attribute><![CDATA[keep_codes_order]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[3364]]></qid>
    <attribute><![CDATA[max_answers]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[3364]]></qid>
    <attribute><![CDATA[max_subquestions]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[3364]]></qid>
    <attribute><![CDATA[min_answers]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[3364]]></qid>
    <attribute><![CDATA[only_pull]]></attribute>
    <value><![CDATA[no]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[3364]]></qid>
    <attribute><![CDATA[page_break]]></attribute>
    <value><![CDATA[0]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[3364]]></qid>
    <attribute><![CDATA[printable_help]]></attribute>
    <value/>
    <language><![CDATA[en]]></language>
   </row>
   <row>
    <qid><![CDATA[3364]]></qid>
    <attribute><![CDATA[public_statistics]]></attribute>
    <value><![CDATA[0]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[3364]]></qid>
    <attribute><![CDATA[random_group]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[3364]]></qid>
    <attribute><![CDATA[rank_title]]></attribute>
    <value/>
    <language><![CDATA[en]]></language>
   </row>
   <row>
    <qid><![CDATA[3364]]></qid>
    <attribute><![CDATA[samechoiceheight]]></attribute>
    <value><![CDATA[1]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[3364]]></qid>
    <attribute><![CDATA[samelistheight]]></attribute>
    <value><![CDATA[1]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[3364]]></qid>
    <attribute><![CDATA[show_handle]]></attribute>
    <value><![CDATA[no]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[3364]]></qid>
    <attribute><![CDATA[show_number]]></attribute>
    <value><![CDATA[no]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[3364]]></qid>
    <attribute><![CDATA[showpopups]]></attribute>
    <value><![CDATA[1]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[3364]]></qid>
    <attribute><![CDATA[statistics_graphtype]]></attribute>
    <value><![CDATA[0]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[3364]]></qid>
    <attribute><![CDATA[statistics_showgraph]]></attribute>
    <value><![CDATA[1]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[3364]]></qid>
    <attribute><![CDATA[subquestion_order]]></attribute>
    <value><![CDATA[normal]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[3364]]></qid>
    <attribute><![CDATA[visualize]]></attribute>
    <value><![CDATA[list]]></value>
    <language/>
   </row>
  </rows>
 </question_attributes>
</document>
limesurvey_group_196.lsg (18,596 bytes)   
DenisChenu

DenisChenu

2026-09-02 09:15

developer   ~85545

Language of the group?

lavamind

lavamind

2026-09-02 15:23

reporter   ~85548

Language of the group?

English (Base language)

anarcat

anarcat

2026-09-02 15:29

reporter   ~85549

not sure i understand the question, but no special language configuration here, i think it's all english.

i'm the one who originally created this survey and lavamind was kind enough to file a proper bug report here for me (which I would probably have failed at least in some way).

i'm french speaking, but i don't think that should matter: my locale is english in my browser, and same in limesurvey, as far as i know.

otherwise, how would i check this?

a human-readable reproducer without a lsg is:

  1. create a survey
  2. create a list(radio) question with a/b as answers
  3. create a advanced ranking question with a/b as answers
  4. add a condition that question created in 2 is equal to b (technically, ((Q00.NAOK == "A003")))
  5. preview the survey (which works for the front page
  6. click "next' (which crashes with the SQL exception)

i bet this is a postgresql issue too. i have tried to figure out where that query is generated but it's so generic that it's really hard to tell. i bet there might be an ORM underneath hiding some stuff as well.

happy to debug this further.

c_schmitz

c_schmitz

2026-09-02 16:41

administrator   ~85550

Can you enable debug = 2 in application/config/config.php and try again, please? Paste the complete error message here.

anarcat

anarcat

2026-09-02 17:28

reporter   ~85551

here's a screenshot of more details visible to the user when the crash happens.

looks like the root cause is somewhere around /srv/www/survey.torproject.org/7.0.12+260833/limesurvey/application/helpers/expressions/em_manager_helper.php(7434): CActiveRecord->find(), which is:

                         $question = \Question::model()->find("qid = :qid", [":qid" => $qid]);`
anarcat

anarcat

2026-09-02 17:41

reporter   ~85552

i was able to work around the problem with this patch:

modified   application/helpers/expressions/em_manager_helper.php
@@ -7429,16 +7429,6 @@ class LimeExpressionManager
                             $relParts[] = "      $('#answer" . $sq['sgqa'] . "').click();\n"; // trigger click : no need other think, and whole event happen
                             $relParts[] = "    }\n";
                             break;
-                        case Question::QT_R_RANKING:
-                            $qid = substr((string) $sq['rowdivid'], 2 + strlen((string) $sq['sgqa']));
-                            $question = \Question::model()->find("qid = :qid", [":qid" => $qid]);
-                            $listItem = $question->title;
-                            $relParts[] = " $('#questionQ{$arg['qid']} .select-list select').each(function(){ \n";
-                            $relParts[] = "   if($(this).val()=='{$listItem}'){ \n";
-                            $relParts[] = "     $(this).val('').trigger('change'); \n";
-                            $relParts[] = "   }; \n";
-                            $relParts[] = " }); \n";
-                            break;
                         default:
                             break;
                     }
anarcat

anarcat

2026-09-02 17:44

reporter   ~85553

also, for what it's worth, in that context $sq['rowdivid'] and $sq['sgqa'] are equally the string Q3867 or some digit i forgot following the character Q, so there's no way that substr can do anything meaningful.

i suspect that switch is cruft that can be entirely removed, but this function is hundreds of lines long and i can't make heads or tails out of it.

DenisChenu

DenisChenu

2026-09-02 17:53

developer   ~85554

Hi !
I just have the issue with this survey : https://gitlab.com/SondagesPro/ExportAndStats/pdfReport/-/blob/master/demo/limesurvey_survey_demoLimePdf.lss?ref_type=heads

See hre, i just add a tracavar : https://master.sondages.pro/623299?newtest=Y&lang=en

Seems $sq['rowdivid'] have a Q(qid) (it muts not)

I send a clean LSS tomorrow (time to quit now)

Issue History

Date Modified Username Field Change
2026-09-01 23:20 lavamind New Issue
2026-09-01 23:21 lavamind Note Added: 85543
2026-09-01 23:21 lavamind File Added: limesurvey_group_196.lsg
2026-09-01 23:21 lavamind Bug heat 0 => 2
2026-09-02 09:15 DenisChenu Note Added: 85545
2026-09-02 09:15 DenisChenu Bug heat 2 => 4
2026-09-02 15:23 lavamind Note Added: 85548
2026-09-02 15:29 anarcat Note Added: 85549
2026-09-02 15:29 anarcat Bug heat 4 => 6
2026-09-02 16:41 c_schmitz Note Added: 85550
2026-09-02 16:41 c_schmitz Bug heat 6 => 8
2026-09-02 17:28 anarcat Note Added: 85551
2026-09-02 17:28 anarcat File Added: Screenshot 2026-09-02 at 11-23-27 CDbException.png
2026-09-02 17:41 anarcat Note Added: 85552
2026-09-02 17:44 anarcat Note Added: 85553
2026-09-02 17:53 DenisChenu Note Added: 85554