View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 18394 | Bug reports | Survey editing | public | 2022-10-04 14:52 | 2026-10-20 17:06 |
| Reporter | gabrieljenik | Assigned To | c_schmitz | ||
| Priority | none | Severity | partial_block | ||
| Status | closed | Resolution | fixed | ||
| Product Version | 5.3.x | ||||
| Summary | 18394: Sometimes, when creating/copying questions, code dump can ocurr | ||||
| Description | Caught while reviewing 18323. models/QuestionTypes.php
Sometimes, when creating a question, wrongly, it may happen that the survey is not ready associated to a question.
Fix:
| ||||
| Steps To Reproduce | Same as in 18323 I understand this is very difficult to reproduce on other situations and maybe, will not happen on other situations. | ||||
| Tags | No tags attached. | ||||
| Bug heat | 8 | ||||
| Complete LimeSurvey version number (& build) | 5.3.30 | ||||
| I will donate to the project if issue is resolved | No | ||||
| Browser | Opera | ||||
| Database type & version | mariadb Ver 15.1 Distrib 10.4.25-MariaDB, for Linux (x86_64) using readline 5.1 | ||||
| Server OS (if known) | |||||
| Webserver software & version (if known) | |||||
| PHP Version | 7.4 | ||||
| Git branch / Pull Request URL | |||||
| related to | 18323 | closed | gabrieljenik | When copying a question with sub-questions, the sub-questions are not copied |
| related to | 18404 | closed | gabrieljenik | Error after copying question: Trying to property 'language' of non-object |
|
If we set question->sid before other atttributes ? Else sid can not be empty when save, rules didn't go by order ? |
|
|
That would be a workaround. Don't believe it is good to rely on a way to use a model to not trigger a dump. |
|
|
Ex: https://www.yiiframework.com/wiki/168/create-your-own-validation-rule |
|
I don't understand
When you save a question sid must be set and survey must exist |
|
OK : replace the current validation by specific function : this make easier to understand and fix : Yes :+1: |
|
Validators are usually run before saving, but not always, as it is the case on 18323. |
|
|
Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=40837 |
|
|
Fixed in Release 7.7.0+261020 |
|
|
LimeSurvey: master 2f8f0dac 2026-10-13 21:49 Details Diff |
Fixed issue 18394: Creating or copying a question could end in a PHP error if the question was validated before its survey was set |
Affected Issues 18394 |
|
| mod - application/models/Question.php | Diff File | ||
| mod - application/models/QuestionType.php | Diff File | ||
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2022-10-04 14:52 | gabrieljenik | New Issue | |
| 2022-10-04 14:52 | gabrieljenik | Issue generated from: 18323 | |
| 2022-10-04 14:52 | gabrieljenik | Relationship added | related to 18323 |
| 2022-10-04 14:53 | gabrieljenik | Status | new => confirmed |
| 2022-10-04 14:55 | gabrieljenik | Description Updated | |
| 2022-10-04 14:55 | gabrieljenik | Steps to Reproduce Updated | |
| 2022-10-04 15:17 | DenisChenu | Note Added: 72081 | |
| 2022-10-04 15:17 | DenisChenu | Bug heat | 0 => 2 |
| 2022-10-04 15:20 | gabrieljenik | Note Added: 72083 | |
| 2022-10-04 15:20 | gabrieljenik | Bug heat | 2 => 4 |
| 2022-10-04 15:21 | gabrieljenik | Note Added: 72085 | |
| 2022-10-04 15:22 | DenisChenu | Note Added: 72086 | |
| 2022-10-04 15:23 | DenisChenu | Note Added: 72088 | |
| 2022-10-04 15:24 | gabrieljenik | Note Added: 72089 | |
| 2022-10-12 01:30 | gabrieljenik | Relationship added | related to 18404 |
| 2026-10-13 21:49 | c_schmitz | Changeset attached | => LimeSurvey master 2f8f0dac |
| 2026-10-13 21:49 | c_schmitz | Note Added: 86441 | |
| 2026-10-13 21:49 | c_schmitz | Assigned To | => c_schmitz |
| 2026-10-13 21:49 | c_schmitz | Status | confirmed => resolved |
| 2026-10-13 21:49 | c_schmitz | Resolution | open => fixed |
| 2026-10-13 21:49 | c_schmitz | Bug heat | 4 => 6 |
| 2026-10-20 17:06 | LimeBot | Note Added: 86604 | |
| 2026-10-20 17:06 | LimeBot | Status | resolved => closed |
| 2026-10-20 17:06 | LimeBot | Bug heat | 6 => 8 |