View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
17158 | Bug reports | Menu system | public | 2021-03-03 12:45 | 2021-04-06 14:43 |
Reporter | PMagel | Assigned To | ollehar | ||
Priority | high | Severity | block | ||
Status | closed | Resolution | fixed | ||
Product Version | 4.4.0-RC2 | ||||
Fixed in Version | 4.4.12 | ||||
Summary | 17158: Question type: List (Ratio) does not save state. | ||||
Description | We found a Problem regarding the List (Ratio) question type. | ||||
Steps To Reproduce | Just create 2 questions, first a List (Ratio) type and the second one I selected a Long free text as an example. | ||||
Additional Information | We found a solution for this in the file 'application/models/QuestionBaseRenderer.php' in 'protected function setDefaultIfEmpty($value, $default)' at Line 294-303 we added this: if (($value === 0) || ($value === "0")) { It solves the Problem. | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
Bug heat | 4 | ||||
Complete LimeSurvey version number (& build) | Version 4.4.0-RC4+210120 on my PC but also in version 4.3.30. | ||||
I will donate to the project if issue is resolved | Yes | ||||
Browser | Chrome | ||||
Database type & version | PostgresSQL | ||||
Server OS (if known) | |||||
Webserver software & version (if known) | |||||
PHP Version | 7.4.15 | ||||
You're using an outdated version of LimeSurvey. Please update to the latest version and check if the bug can still be reproduced. Thank you. |
|
I now tested it on version 4.4.11+210301 and the bug is still there. I also tested the described solution and it also worked in this version. |
|
Can you enable debug = 2 in application/config/config.php and try again, please? Paste the complete error message here. |
|
As you told me, I enabled the debug mode, then I specified a 'error_log' destination and there are no errors showing. I even put a test 'error_log()' in the functions that are related to the problem and they are shown as expected. |
|
Thanks! We will look closer. |
|
Wait, how does your suggested fix interact with default values? |
|
Maybe it's better to check for === null? |
|
Okay I checkt your suggestion and It solves the problem and is slimmer. So you can just do it like this: protected function setDefaultIfEmpty($value, $default) |
|
Thanks for the help! |
|
Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=31494 |
|
Date Modified | Username | Field | Change |
---|---|---|---|
2021-03-03 12:45 | PMagel | New Issue | |
2021-03-03 12:45 | PMagel | File Added: limesurvey_survey_319611.lss | |
2021-03-03 14:28 | ollehar | Assigned To | => ollehar |
2021-03-03 14:28 | ollehar | Status | new => feedback |
2021-03-03 14:28 | ollehar | Note Added: 62644 | |
2021-03-03 14:51 | PMagel | Note Added: 62655 | |
2021-03-03 14:51 | PMagel | Status | feedback => assigned |
2021-03-03 14:56 | ollehar | Priority | none => high |
2021-03-03 14:56 | ollehar | Severity | minor => block |
2021-03-03 14:56 | ollehar | Description Updated | |
2021-03-03 14:56 | ollehar | Steps to Reproduce Updated | |
2021-03-03 14:56 | ollehar | Additional Information Updated | |
2021-03-03 14:56 | ollehar | Note Added: 62657 | |
2021-03-04 11:25 | PMagel | Note Added: 62709 | |
2021-03-04 11:53 | ollehar | Note Added: 62710 | |
2021-03-04 19:55 | ollehar | Note Added: 62740 | |
2021-03-04 19:55 | ollehar | Status | assigned => feedback |
2021-03-04 19:58 | ollehar | Note Added: 62741 | |
2021-03-05 09:27 | PMagel | Note Added: 62747 | |
2021-03-05 09:27 | PMagel | Status | feedback => assigned |
2021-03-05 11:00 | ollehar | Status | assigned => resolved |
2021-03-05 11:00 | ollehar | Resolution | open => fixed |
2021-03-05 11:00 | ollehar | Note Added: 62748 | |
2021-03-08 19:31 | c_schmitz | Fixed in Version | => 4.4.12 |
2021-03-08 19:33 | c_schmitz | Status | resolved => closed |
2021-04-06 14:43 | ollehar | Changeset attached | => LimeSurvey master e94f4c05 |
2021-04-06 14:43 | ollehar | Note Added: 63824 |