View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
19377 | Bug reports | Question editor | public | 2024-01-26 18:40 | 2024-02-05 18:55 |
Reporter | sajolida | Assigned To | |||
Priority | none | Severity | partial_block | ||
Status | new | Resolution | open | ||
Product Version | 6.4.x | ||||
Summary | 19377: CDbCommand fails with "Invalid text representation" when adding Y-Scale subquestions on Array (Texts) with PostgreSQL | ||||
Description | Trying to create a survey for torproject.org. Our internal bug report: https://gitlab.torproject.org/tpo/tpa/team/-/issues/41500. When adding a subquestion on the Y-Scale of an Array (Texts) question, I get the following error: CDbCommand failed to execute the SQL statement: SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for type integer: "new77101" LINE 1: ...ELECT * FROM "lime_questions" "t" WHERE "t"."qid"='new77101'... Tor's instance uses a PostgreSQL database. Similar things that do work:
It seems like it's only adding a new subquestion from the UI with a PostgreSQL backend that fails. I'm attaching the LSQ that I could create on MariaDB and could import on PostgreSQL, but with which I cannot add a new subquestion on PostgreSQL. | ||||
Steps To Reproduce | Steps to reproduce(Replace this text with detailed step-by-step instructions on how to reproduce the issue) Expected result(Write here what you expected to happen) Actual result(Write here what happened instead) | ||||
Tags | PostgreSQL | ||||
Attached Files | groups.lsq (18,181 bytes)
<?xml version="1.0" encoding="UTF-8"?> <document> <LimeSurveyDocType>Question</LimeSurveyDocType> <DBVersion>619</DBVersion> <languages> <language>en</language> </languages> <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[70]]></qid> <parent_qid><![CDATA[0]]></parent_qid> <sid><![CDATA[987127]]></sid> <gid><![CDATA[8]]></gid> <type><![CDATA[;]]></type> <title><![CDATA[GROUPS]]></title> <preg/> <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[arrays/texts]]></question_theme_name> <modulename/> <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> <fieldname>id</fieldname> <fieldname>question</fieldname> <fieldname>help</fieldname> <fieldname>script</fieldname> <fieldname>language</fieldname> </fields> <rows> <row> <qid><![CDATA[71]]></qid> <parent_qid><![CDATA[70]]></parent_qid> <sid><![CDATA[987127]]></sid> <gid><![CDATA[8]]></gid> <type><![CDATA[T]]></type> <title><![CDATA[G01]]></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> <id><![CDATA[75]]></id> <question><![CDATA[Group]]></question> <language><![CDATA[en]]></language> </row> <row> <qid><![CDATA[73]]></qid> <parent_qid><![CDATA[70]]></parent_qid> <sid><![CDATA[987127]]></sid> <gid><![CDATA[8]]></gid> <type><![CDATA[T]]></type> <title><![CDATA[G02]]></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> <id><![CDATA[77]]></id> <question><![CDATA[Group]]></question> <language><![CDATA[en]]></language> </row> <row> <qid><![CDATA[75]]></qid> <parent_qid><![CDATA[70]]></parent_qid> <sid><![CDATA[987127]]></sid> <gid><![CDATA[8]]></gid> <type><![CDATA[T]]></type> <title><![CDATA[G03]]></title> <other><![CDATA[N]]></other> <encrypted><![CDATA[N]]></encrypted> <question_order><![CDATA[2]]></question_order> <scale_id><![CDATA[0]]></scale_id> <same_default><![CDATA[0]]></same_default> <relevance><![CDATA[1]]></relevance> <same_script><![CDATA[0]]></same_script> <id><![CDATA[79]]></id> <question><![CDATA[Group]]></question> <language><![CDATA[en]]></language> </row> <row> <qid><![CDATA[77]]></qid> <parent_qid><![CDATA[70]]></parent_qid> <sid><![CDATA[987127]]></sid> <gid><![CDATA[8]]></gid> <type><![CDATA[T]]></type> <title><![CDATA[G04]]></title> <other><![CDATA[N]]></other> <encrypted><![CDATA[N]]></encrypted> <question_order><![CDATA[3]]></question_order> <scale_id><![CDATA[0]]></scale_id> <same_default><![CDATA[0]]></same_default> <relevance><![CDATA[1]]></relevance> <same_script><![CDATA[0]]></same_script> <id><![CDATA[81]]></id> <question><![CDATA[Group]]></question> <language><![CDATA[en]]></language> </row> <row> <qid><![CDATA[78]]></qid> <parent_qid><![CDATA[70]]></parent_qid> <sid><![CDATA[987127]]></sid> <gid><![CDATA[8]]></gid> <type><![CDATA[T]]></type> <title><![CDATA[G05]]></title> <other><![CDATA[N]]></other> <encrypted><![CDATA[N]]></encrypted> <question_order><![CDATA[4]]></question_order> <scale_id><![CDATA[0]]></scale_id> <same_default><![CDATA[0]]></same_default> <relevance><![CDATA[1]]></relevance> <same_script><![CDATA[0]]></same_script> <id><![CDATA[82]]></id> <question><![CDATA[Group]]></question> <language><![CDATA[en]]></language> </row> <row> <qid><![CDATA[79]]></qid> <parent_qid><![CDATA[70]]></parent_qid> <sid><![CDATA[987127]]></sid> <gid><![CDATA[8]]></gid> <type><![CDATA[T]]></type> <title><![CDATA[G06]]></title> <other><![CDATA[N]]></other> <encrypted><![CDATA[N]]></encrypted> <question_order><![CDATA[5]]></question_order> <scale_id><![CDATA[0]]></scale_id> <same_default><![CDATA[0]]></same_default> <relevance><![CDATA[1]]></relevance> <same_script><![CDATA[0]]></same_script> <id><![CDATA[83]]></id> <question><![CDATA[Group]]></question> <language><![CDATA[en]]></language> </row> <row> <qid><![CDATA[80]]></qid> <parent_qid><![CDATA[70]]></parent_qid> <sid><![CDATA[987127]]></sid> <gid><![CDATA[8]]></gid> <type><![CDATA[T]]></type> <title><![CDATA[G07]]></title> <other><![CDATA[N]]></other> <encrypted><![CDATA[N]]></encrypted> <question_order><![CDATA[6]]></question_order> <scale_id><![CDATA[0]]></scale_id> <same_default><![CDATA[0]]></same_default> <relevance><![CDATA[1]]></relevance> <same_script><![CDATA[0]]></same_script> <id><![CDATA[84]]></id> <question><![CDATA[Group]]></question> <language><![CDATA[en]]></language> </row> <row> <qid><![CDATA[81]]></qid> <parent_qid><![CDATA[70]]></parent_qid> <sid><![CDATA[987127]]></sid> <gid><![CDATA[8]]></gid> <type><![CDATA[T]]></type> <title><![CDATA[G08]]></title> <other><![CDATA[N]]></other> <encrypted><![CDATA[N]]></encrypted> <question_order><![CDATA[7]]></question_order> <scale_id><![CDATA[0]]></scale_id> <same_default><![CDATA[0]]></same_default> <relevance><![CDATA[1]]></relevance> <same_script><![CDATA[0]]></same_script> <id><![CDATA[85]]></id> <question><![CDATA[Group]]></question> <language><![CDATA[en]]></language> </row> <row> <qid><![CDATA[82]]></qid> <parent_qid><![CDATA[70]]></parent_qid> <sid><![CDATA[987127]]></sid> <gid><![CDATA[8]]></gid> <type><![CDATA[T]]></type> <title><![CDATA[G09]]></title> <other><![CDATA[N]]></other> <encrypted><![CDATA[N]]></encrypted> <question_order><![CDATA[8]]></question_order> <scale_id><![CDATA[0]]></scale_id> <same_default><![CDATA[0]]></same_default> <relevance><![CDATA[1]]></relevance> <same_script><![CDATA[0]]></same_script> <id><![CDATA[86]]></id> <question><![CDATA[Group]]></question> <language><![CDATA[en]]></language> </row> <row> <qid><![CDATA[83]]></qid> <parent_qid><![CDATA[70]]></parent_qid> <sid><![CDATA[987127]]></sid> <gid><![CDATA[8]]></gid> <type><![CDATA[T]]></type> <title><![CDATA[G10]]></title> <other><![CDATA[N]]></other> <encrypted><![CDATA[N]]></encrypted> <question_order><![CDATA[9]]></question_order> <scale_id><![CDATA[0]]></scale_id> <same_default><![CDATA[0]]></same_default> <relevance><![CDATA[1]]></relevance> <same_script><![CDATA[0]]></same_script> <id><![CDATA[87]]></id> <question><![CDATA[Group]]></question> <language><![CDATA[en]]></language> </row> <row> <qid><![CDATA[84]]></qid> <parent_qid><![CDATA[70]]></parent_qid> <sid><![CDATA[987127]]></sid> <gid><![CDATA[8]]></gid> <type><![CDATA[T]]></type> <title><![CDATA[G11]]></title> <other><![CDATA[N]]></other> <encrypted><![CDATA[N]]></encrypted> <question_order><![CDATA[10]]></question_order> <scale_id><![CDATA[0]]></scale_id> <same_default><![CDATA[0]]></same_default> <relevance><![CDATA[1]]></relevance> <same_script><![CDATA[0]]></same_script> <id><![CDATA[88]]></id> <question><![CDATA[Group]]></question> <language><![CDATA[en]]></language> </row> <row> <qid><![CDATA[85]]></qid> <parent_qid><![CDATA[70]]></parent_qid> <sid><![CDATA[987127]]></sid> <gid><![CDATA[8]]></gid> <type><![CDATA[T]]></type> <title><![CDATA[G12]]></title> <other><![CDATA[N]]></other> <encrypted><![CDATA[N]]></encrypted> <question_order><![CDATA[11]]></question_order> <scale_id><![CDATA[0]]></scale_id> <same_default><![CDATA[0]]></same_default> <relevance><![CDATA[1]]></relevance> <same_script><![CDATA[0]]></same_script> <id><![CDATA[89]]></id> <question><![CDATA[Group]]></question> <language><![CDATA[en]]></language> </row> <row> <qid><![CDATA[86]]></qid> <parent_qid><![CDATA[70]]></parent_qid> <sid><![CDATA[987127]]></sid> <gid><![CDATA[8]]></gid> <type><![CDATA[T]]></type> <title><![CDATA[G13]]></title> <other><![CDATA[N]]></other> <encrypted><![CDATA[N]]></encrypted> <question_order><![CDATA[12]]></question_order> <scale_id><![CDATA[0]]></scale_id> <same_default><![CDATA[0]]></same_default> <relevance><![CDATA[1]]></relevance> <same_script><![CDATA[0]]></same_script> <id><![CDATA[90]]></id> <question><![CDATA[Group]]></question> <language><![CDATA[en]]></language> </row> <row> <qid><![CDATA[87]]></qid> <parent_qid><![CDATA[70]]></parent_qid> <sid><![CDATA[987127]]></sid> <gid><![CDATA[8]]></gid> <type><![CDATA[T]]></type> <title><![CDATA[G14]]></title> <other><![CDATA[N]]></other> <encrypted><![CDATA[N]]></encrypted> <question_order><![CDATA[13]]></question_order> <scale_id><![CDATA[0]]></scale_id> <same_default><![CDATA[0]]></same_default> <relevance><![CDATA[1]]></relevance> <same_script><![CDATA[0]]></same_script> <id><![CDATA[91]]></id> <question><![CDATA[Group]]></question> <language><![CDATA[en]]></language> </row> <row> <qid><![CDATA[88]]></qid> <parent_qid><![CDATA[70]]></parent_qid> <sid><![CDATA[987127]]></sid> <gid><![CDATA[8]]></gid> <type><![CDATA[T]]></type> <title><![CDATA[G15]]></title> <other><![CDATA[N]]></other> <encrypted><![CDATA[N]]></encrypted> <question_order><![CDATA[14]]></question_order> <scale_id><![CDATA[0]]></scale_id> <same_default><![CDATA[0]]></same_default> <relevance><![CDATA[1]]></relevance> <same_script><![CDATA[0]]></same_script> <id><![CDATA[92]]></id> <question><![CDATA[Group]]></question> <language><![CDATA[en]]></language> </row> <row> <qid><![CDATA[72]]></qid> <parent_qid><![CDATA[70]]></parent_qid> <sid><![CDATA[987127]]></sid> <gid><![CDATA[8]]></gid> <type><![CDATA[T]]></type> <title><![CDATA[DESCRIPTION]]></title> <other><![CDATA[N]]></other> <encrypted><![CDATA[N]]></encrypted> <question_order><![CDATA[15]]></question_order> <scale_id><![CDATA[1]]></scale_id> <same_default><![CDATA[0]]></same_default> <relevance/> <same_script><![CDATA[0]]></same_script> <id><![CDATA[76]]></id> <question><![CDATA[Group description]]></question> <language><![CDATA[en]]></language> </row> <row> <qid><![CDATA[74]]></qid> <parent_qid><![CDATA[70]]></parent_qid> <sid><![CDATA[987127]]></sid> <gid><![CDATA[8]]></gid> <type><![CDATA[T]]></type> <title><![CDATA[CARDS]]></title> <other><![CDATA[N]]></other> <encrypted><![CDATA[N]]></encrypted> <question_order><![CDATA[16]]></question_order> <scale_id><![CDATA[1]]></scale_id> <same_default><![CDATA[0]]></same_default> <relevance/> <same_script><![CDATA[0]]></same_script> <id><![CDATA[78]]></id> <question><![CDATA[Cards in group]]></question> <language><![CDATA[en]]></language> </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[74]]></id> <qid><![CDATA[70]]></qid> <question><![CDATA[Which groups did you create and which cards were in them?]]></question> <help><![CDATA[<p>Type the summary of each group in the group description and indicate the card numbers of all the cards that were in this group.</p> <p>For example:</p> <ul> <li>Group description: <em>"Vegetables"</em></li> <li>Cards:<em> "6, 18, 22, 5"</em></li> </ul> <p>Also indicate which cards did you put in the 3 special groups:</p> <ul> <li><em>"Cards that don’t fit with anything"</em></li> <li><em>“Cards that I don’t understand”</em></li> <li><em>“Cards that I would never be interested in”</em></li> </ul> <p>You probably have less groups than the available blank spaces. Only fill in the groups that you have created.</p> ]]></help> <script/> <language><![CDATA[en]]></language> </row> </rows> </question_l10ns> <question_attributes> <fields> <fieldname>qid</fieldname> <fieldname>attribute</fieldname> <fieldname>value</fieldname> <fieldname>language</fieldname> </fields> <rows> <row> <qid><![CDATA[70]]></qid> <attribute><![CDATA[answer_width]]></attribute> <value/> <language/> </row> <row> <qid><![CDATA[70]]></qid> <attribute><![CDATA[array_filter]]></attribute> <value/> <language/> </row> <row> <qid><![CDATA[70]]></qid> <attribute><![CDATA[array_filter_exclude]]></attribute> <value/> <language/> </row> <row> <qid><![CDATA[70]]></qid> <attribute><![CDATA[array_filter_style]]></attribute> <value><![CDATA[0]]></value> <language/> </row> <row> <qid><![CDATA[70]]></qid> <attribute><![CDATA[cssclass]]></attribute> <value/> <language/> </row> <row> <qid><![CDATA[70]]></qid> <attribute><![CDATA[em_validation_q]]></attribute> <value/> <language/> </row> <row> <qid><![CDATA[70]]></qid> <attribute><![CDATA[em_validation_q_tip]]></attribute> <value/> <language><![CDATA[en]]></language> </row> <row> <qid><![CDATA[70]]></qid> <attribute><![CDATA[em_validation_sq]]></attribute> <value/> <language/> </row> <row> <qid><![CDATA[70]]></qid> <attribute><![CDATA[em_validation_sq_tip]]></attribute> <value/> <language><![CDATA[en]]></language> </row> <row> <qid><![CDATA[70]]></qid> <attribute><![CDATA[hidden]]></attribute> <value><![CDATA[0]]></value> <language/> </row> <row> <qid><![CDATA[70]]></qid> <attribute><![CDATA[hide_tip]]></attribute> <value><![CDATA[0]]></value> <language/> </row> <row> <qid><![CDATA[70]]></qid> <attribute><![CDATA[input_size]]></attribute> <value/> <language/> </row> <row> <qid><![CDATA[70]]></qid> <attribute><![CDATA[max_answers]]></attribute> <value/> <language/> </row> <row> <qid><![CDATA[70]]></qid> <attribute><![CDATA[maximum_chars]]></attribute> <value/> <language/> </row> <row> <qid><![CDATA[70]]></qid> <attribute><![CDATA[min_answers]]></attribute> <value/> <language/> </row> <row> <qid><![CDATA[70]]></qid> <attribute><![CDATA[numbers_only]]></attribute> <value><![CDATA[0]]></value> <language/> </row> <row> <qid><![CDATA[70]]></qid> <attribute><![CDATA[page_break]]></attribute> <value><![CDATA[0]]></value> <language/> </row> <row> <qid><![CDATA[70]]></qid> <attribute><![CDATA[placeholder]]></attribute> <value/> <language><![CDATA[en]]></language> </row> <row> <qid><![CDATA[70]]></qid> <attribute><![CDATA[random_group]]></attribute> <value/> <language/> </row> <row> <qid><![CDATA[70]]></qid> <attribute><![CDATA[random_order]]></attribute> <value><![CDATA[0]]></value> <language/> </row> <row> <qid><![CDATA[70]]></qid> <attribute><![CDATA[repeat_headings]]></attribute> <value/> <language/> </row> <row> <qid><![CDATA[70]]></qid> <attribute><![CDATA[save_as_default]]></attribute> <value><![CDATA[N]]></value> <language/> </row> <row> <qid><![CDATA[70]]></qid> <attribute><![CDATA[show_grand_total]]></attribute> <value><![CDATA[0]]></value> <language/> </row> <row> <qid><![CDATA[70]]></qid> <attribute><![CDATA[show_totals]]></attribute> <value><![CDATA[X]]></value> <language/> </row> <row> <qid><![CDATA[70]]></qid> <attribute><![CDATA[statistics_graphtype]]></attribute> <value><![CDATA[0]]></value> <language/> </row> <row> <qid><![CDATA[70]]></qid> <attribute><![CDATA[statistics_showgraph]]></attribute> <value><![CDATA[1]]></value> <language/> </row> </rows> </question_attributes> </document> | ||||
Bug heat | 10 | ||||
Complete LimeSurvey version number (& build) | 6.4.1+240108 | ||||
I will donate to the project if issue is resolved | No | ||||
Browser | |||||
Database type & version | PostgreSQL 15 | ||||
Server OS (if known) | Debian 12 (Bookworm) | ||||
Webserver software & version (if known) | |||||
PHP Version | PHP 7.4 | ||||
Actual, the same happens when I try to add subquestions to a multiple choice question on this instance: CDbCommand failed to execute the SQL statement: SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for type integer: "new12348" LINE 1: ...ELECT * FROM "lime_questions" "t" WHERE "t"."qid"='new12348'... ^ |
|
Actually, the same happens when I try to add a subquestion to a multiple choice question on this instance: CDbCommand failed to execute the SQL statement: SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for type integer: "new12348" LINE 1: ...ELECT * FROM "lime_questions" "t" WHERE "t"."qid"='new12348'... ^ |
|
Actually, the same happens when I try to add subquestions to a multiple choice question: CDbCommand failed to execute the SQL statement: SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for type integer: "new12348" LINE 1: ...ELECT * FROM "lime_questions" "t" WHERE "t"."qid"='new12348'... ^ |
|
Date Modified | Username | Field | Change |
---|---|---|---|
2024-01-26 18:40 | sajolida | New Issue | |
2024-01-26 18:40 | sajolida | File Added: groups.lsq | |
2024-01-26 18:46 | lavamind | Issue Monitored: lavamind | |
2024-01-26 18:46 | lavamind | Bug heat | 0 => 8 |
2024-01-26 19:34 | sajolida | Note Added: 79311 | |
2024-01-26 19:34 | sajolida | Bug heat | 8 => 10 |
2024-01-26 19:37 | sajolida | Note Added: 79312 | |
2024-01-26 19:37 | sajolida | Note Added: 79313 | |
2024-02-05 18:55 | lavamind | Tag Attached: PostgreSQL |