View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
16563 | Bug reports | Survey editing | public | 2020-08-03 19:09 | 2020-12-22 17:14 |
Reporter | estupendu | Assigned To | cdorin | ||
Priority | high | Severity | block | ||
Status | closed | Resolution | fixed | ||
Product Version | 4.3.8 | ||||
Summary | 16563: We cannot create a new question and Limesurvey deletes some answers | ||||
Description | When we try to create a new question this error appears in Postgres Log:
We attach an error that it appears in the console. Afterthat we have created the new question directly into the database and It worked but... when we changed some attribute (e.g. hide tip) Limesurvey deletes some answers from database. See attached the database changes:
| ||||
Tags | No tags attached. | ||||
Attached Files | |||||
Bug heat | 4 | ||||
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 | ||||
related to | 16566 | closed | gabrieljenik | We cannot create multiple choice questions |
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 |
|
Try adding answer options and sub question and modifying from the front end, seems to work as expected AND WAS SUCCESSFULLY ABLE TO ADD QUESTION |
|
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-03 19:09 | estupendu | New Issue | |
2020-08-03 19:09 | estupendu | File Added: Limesurvey_error.JPG | |
2020-08-03 19:09 | estupendu | File Added: lime_question_attributes1.jpg | |
2020-08-03 19:09 | estupendu | File Added: lime_question_attributes2.jpg | |
2020-08-03 19:09 | estupendu | File Added: lime_answers2.jpg | |
2020-08-03 19:09 | estupendu | File Added: lime_answers1.jpg | |
2020-08-03 19:09 | estupendu | File Added: lime_answers_I10ns1.jpg | |
2020-08-04 18:06 | cdorin | Priority | none => high |
2020-08-04 18:06 | cdorin | Status | new => confirmed |
2020-08-04 18:06 | cdorin | Description Updated | |
2020-08-04 18:06 | cdorin | Zoho Sprints | => |Yes| |
2020-08-04 18:06 |
|
Zoho Sprints ID | => 14469000000204061 |
2020-08-10 18:27 | gabrieljenik | Relationship added | related to 16566 |
2020-08-10 18:36 | gabrieljenik | Note Added: 59397 | |
2020-08-12 14:11 |
|
Note Added: 59445 | |
2020-08-12 17:50 | gabrieljenik | Changeset attached | => LimeSurvey master 16425fff |
2020-08-13 10:53 |
|
Zoho Sprints | Yes => |Yes| |
2020-08-13 10:53 |
|
Zoho Sprints | Yes => |Yes| |
2020-08-13 10:53 |
|
Status | confirmed => resolved |
2020-08-13 10:53 |
|
Status | confirmed => resolved |
2020-12-22 17:14 | cdorin | Assigned To | => cdorin |
2020-12-22 17:14 | cdorin | Status | resolved => closed |
2020-12-22 17:14 | cdorin | Resolution | open => fixed |