View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 10812 | Bug reports | Survey editing | public | 2016-03-22 16:22 | 2016-04-01 11:36 |
| Reporter | ollehar | Assigned To | DenisChenu | ||
| Priority | none | Severity | minor | ||
| Status | closed | Resolution | fixed | ||
| Product Version | 2.50.x | ||||
| Target Version | 2.50.x | Fixed in Version | 2.50.x | ||
| Summary | 10812: Default answers must check for type | ||||
| Description | Default answers must check for type. Otherwise pgsql will throw exception. | ||||
| Steps To Reproduce | Create multiple numeric question. | ||||
| Tags | No tags attached. | ||||
| Attached Files | |||||
| Bug heat | 6 | ||||
| Complete LimeSurvey version number (& build) | latest | ||||
| I will donate to the project if issue is resolved | No | ||||
| Browser | - | ||||
| Database type & version | pgsql | ||||
| Server OS (if known) | - | ||||
| Webserver software & version (if known) | - | ||||
| PHP Version | - | ||||
|
Similar problem in 2.06: Did not save An unexpected error has occurred and your responses cannot be saved. Your responses have not been lost and have been emailed to the survey administrator and will be entered into our database at a later point. |
|
|
Great catch :) (and now i understand why i receive email ...) Totally right :) But : attention default answer can be Expression . More simple expression : {TOKEN:FIRTSNAME} |
|
|
Ah. Then it needs to be evaluated and checked? |
|
|
Yes, but i think it's in EM : fix it before set in saveValue. I think EM do it always, but seem not ... |
|
|
@olle :
The 1.1 is the minimum : fix the SQL only but bad value can be shown to user. What do you think of this ? |
|
|
Hm, I would probably insert fix when the default answer is being saved. Check if question type is numeric - if yes, check if you can parse the value as number. So 1.1. |
|
|
Well, 2.1 would be nice, too. :P |
|
|
Then : don't save in DB if "invalid" : like when we click at "NEXT" but set in $_SESSION. With this method : set in session : VALUE of slider can be A2 for example :) |
|
|
Wait, no. I'm thinking about the back-end, when saving default value. That's where the check needs to be. |
|
|
No : you can not validate backend : {TOKEN:ATTRIBUTE_1}, {if(1==0,"",212)} etc .... |
|
|
OK, so only check question type in back-end, then? |
|
|
???? if numeric : can we accept {TOKEN:ATTRIBUTE_1} ? I don't want to test if it's an expression or not. No ? |
|
|
OK, must fix exactly at the same way the "User enter something in input", click next. Then linked with https://bugs.limesurvey.org/view.php?id=10825 |
|
|
Semi fixed with : https://bugs.limesurvey.org/view.php?id=10825 :) Just like "user submit a bad value" |
|
|
OK, this one is fixed . Just like an user set a bad value. I fix the other : fix in _validateQuestion : if answer type is invalid : leave it in session, but set it to NULL/empty in DB : OK ? |
|
|
Version 2.50+ Build 160401 released |
|
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2016-03-22 16:22 | ollehar | New Issue | |
| 2016-03-22 16:23 | ollehar | Note Added: 36713 | |
| 2016-03-22 17:28 | DenisChenu | Note Added: 36731 | |
| 2016-03-22 17:28 | DenisChenu | Assigned To | => DenisChenu |
| 2016-03-22 17:28 | DenisChenu | Status | new => assigned |
| 2016-03-22 17:29 | ollehar | Note Added: 36732 | |
| 2016-03-22 18:13 | DenisChenu | Note Added: 36735 | |
| 2016-03-23 08:32 | DenisChenu | Note Added: 36740 | |
| 2016-03-23 15:31 | ollehar | Note Added: 36742 | |
| 2016-03-23 15:37 | ollehar | Note Added: 36745 | |
| 2016-03-23 15:44 | DenisChenu | Note Added: 36746 | |
| 2016-03-23 15:51 | ollehar | Note Added: 36747 | |
| 2016-03-23 16:22 | DenisChenu | Note Added: 36749 | |
| 2016-03-23 16:22 | DenisChenu | Note Edited: 36749 | |
| 2016-03-23 16:37 | ollehar | Note Added: 36750 | |
| 2016-03-23 16:46 | DenisChenu | Note Added: 36752 | |
| 2016-03-24 12:33 | DenisChenu | Note Added: 36779 | |
| 2016-03-24 15:37 | DenisChenu | Note Added: 36789 | |
| 2016-03-25 17:38 | DenisChenu | File Added: Capture du 2016-03-25 17-38-25.png | |
| 2016-03-25 17:39 | DenisChenu | Note Added: 36812 | |
| 2016-03-25 17:40 | DenisChenu | Status | assigned => resolved |
| 2016-03-25 17:40 | DenisChenu | Fixed in Version | => 2.5 |
| 2016-03-25 17:40 | DenisChenu | Resolution | open => fixed |
| 2016-04-01 11:36 | c_schmitz | Note Added: 36886 | |
| 2016-04-01 11:36 | c_schmitz | Status | resolved => closed |
| 2019-11-01 17:25 | c_schmitz | Category | Survey design => Survey editing |