View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
16566 | Bug reports | Survey editing | public | 2020-08-04 10:43 | 2020-08-17 14:05 |
Reporter | estupendu | Assigned To | gabrieljenik | ||
Priority | high | Severity | block | ||
Status | closed | Resolution | fixed | ||
Product Version | 4.3.8 | ||||
Summary | 16566: We cannot create multiple choice questions | ||||
Description | When we create a multiple choice questions this error appears in postgres log: ERROR: invalid input syntax for integer: "random3l4waqd" at character 67 | ||||
Tags | No tags attached. | ||||
Bug heat | 14 | ||||
Complete LimeSurvey version number (& build) | Version 4.3.8+200803 | ||||
I will donate to the project if issue is resolved | No | ||||
Browser | Chrome | ||||
Database type & version | PostgreSQL 9.5 | ||||
Server OS (if known) | Linux Centos | ||||
Webserver software & version (if known) | |||||
PHP Version | 7.3.13 | ||||
Is it only with multiple choice? Seems I cannot create any question type if I switch to pgsql 10.12 |
|
It is not with multiple choice. See another bug report: 16563 |
|
I have the same problem with for both multiple choice & array questions. sub-questions are not being saved and a red empty box appears when trying to save (a screenshot is attached) My configuration: (LS version 4.3.5+200721 - PHP 7.2.1 - Database: MS SQL Server 2016) |
|
Random characters sometimes could come on qid when creating new questions as those are used by vue to identify internally new rows. Before issue 16469, QuestionEditorController tried to find the questions using 'findByPk', which automatically casts the value to int, removing characters. Now, 'find' is used because the survey ID is added to the search criterias. When saving a new question, Question object is empty, and the resulting SQL fails in Postgres because of the data type. PR: https://github.com/LimeSurvey/LimeSurvey/pull/1543 |
|
Tested the issue before pulling the PR, Issue exist. Tested the issue after pulling the PR, below are my findings: Please refer the attachment for more details, working as expected |
|
Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=30372 |
|
Fixed in Release 4.3.11+200817 |
|
LimeSurvey: master 16425fff 2020-08-12 19:50 Committer: GitHub Details Diff |
Fixed issue 16566: We cannot create multiple choice questions (#1543) Dev: Before issue 16469, QuestionEditorController tried to find the questions using 'findByPk', which automatically casts the value to int. Now, 'find' is used because the survey ID, as the search is done by multiple criterias. Dev: When saving a new question, 'qid' is an empty string, and the resulting SQL fails in Postgres because of the data type. Solved by casting 'qid' to int. Dev: This also helps with issue 16563. Dev: Casting subquestion id as to remove the random characters vue id adds for its view. |
Affected Issues 16469, 16563, 16566 |
|
mod - application/controllers/QuestionEditorController.php | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2020-08-04 10:43 | estupendu | New Issue | |
2020-08-04 15:57 | cdorin | Note Added: 59289 | |
2020-08-04 15:57 | cdorin | Priority | none => high |
2020-08-04 15:57 | cdorin | Status | new => confirmed |
2020-08-04 15:57 | cdorin | Zoho Sprints | => |Yes| |
2020-08-04 15:57 |
|
Zoho Sprints ID | => 14469000000204049 |
2020-08-04 16:09 | estupendu | Note Added: 59291 | |
2020-08-05 06:53 | medhat | Note Added: 59316 | |
2020-08-05 06:53 | medhat | File Added: multiple choice error.jpg | |
2020-08-05 06:55 | medhat | Issue Monitored: medhat | |
2020-08-10 18:27 | gabrieljenik | Relationship added | related to 16563 |
2020-08-10 18:34 | gabrieljenik | Note Added: 59396 | |
2020-08-12 14:06 |
|
Note Added: 59444 | |
2020-08-12 14:06 |
|
File Added: 16566_Posgres_Createquestion.png | |
2020-08-12 17:50 | gabrieljenik | Changeset attached | => LimeSurvey master 16425fff |
2020-08-12 17:50 | gabrieljenik | Note Added: 59452 | |
2020-08-12 17:50 | gabrieljenik | Assigned To | => gabrieljenik |
2020-08-12 17:50 | gabrieljenik | Resolution | open => fixed |
2020-08-13 10:48 |
|
Zoho Sprints | Yes => |Yes| |
2020-08-13 10:48 |
|
Status | confirmed => resolved |
2020-08-17 14:05 | lime_release_bot | Zoho Sprints | Yes => |Yes| |
2020-08-17 14:05 | lime_release_bot | Note Added: 59471 | |
2020-08-17 14:05 | lime_release_bot | Status | resolved => closed |
2021-08-02 18:51 | guest | Bug heat | 12 => 14 |