View Issue Details

IDProjectCategoryView StatusLast Update
16414Bug reportsQuestion editorpublic2021-04-08 17:18
Reportergabrieljenik Assigned Togabrieljenik  
PrioritynoneSeveritypartial_block 
Status resolvedResolutionfixed 
Product Version3.22.20 
Summary16414: Question editor is not loaded when config.xml attribute has empty string as default
DescriptionDetected while working on 15596 and getting errors with the fixed_width attribute.
Steps To Reproduce1 - Edit config.xml for image_Select.
     On fixed_width attribute make deault to be empty string.
     `<default></default>`
2 - Apply image_select theme to a question.
3 - Advanced attributes will not be loaded.

On the backend a 500 error will be thrown,
- `CHtml::numberField parameter 1 expected string and array given`.
- `application/views/admin/survey/Question/advanced_settings_view.php`

```
// Integer
                    case 'integer':
                        echo CHtml::numberField($aAttribute['name'],$aAttribute['value'],array(
                            'class'=>"form-control",
                            'disabled'=>$readonly,
                            'step'=>1,
                            'pattern'=>'\d+',
                            'min'=>(isset($aAttribute['min'])?$aAttribute['min']:1),
                            'max'=>(isset($aAttribute['max'])?$aAttribute['max']:null),
                            'aria-describedby'=>"help{$aAttribute['name']}",
                        ));
                        break;
```
TagsNo tags attached.
Complete LimeSurvey version number (& build)3.22.20
I will donate to the project if issue is resolvedNo
Browser
Database & DB-VersionMysql
Server OS (if known)
Webserver software & version (if known)
PHP Version7

Activities

DenisChenu

DenisChenu

2020-06-23 09:17

developer   ~58393

@tpartner : i think you already report this issue ?
tpartner

tpartner

2020-06-23 14:46

developer   ~58404

@DenisChenu: not quite, this is my bug - https://bugs.limesurvey.org/view.php?id=16124
ollehar

ollehar

2021-03-10 17:11

administrator   ~63055

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.
gabrieljenik

gabrieljenik

2021-03-29 18:12

manager   ~63714

PR: https://github.com/LimeSurvey/LimeSurvey/pull/1829
gabrieljenik

gabrieljenik

2021-04-01 16:31

manager   ~63782

Fix committed to 3.x-LTS branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=31465

Related Changesets

LimeSurvey: 3.x-LTS a7b07dad

2021-04-01 16:27:05

gabrieljenik


Committer: GitHub Details Diff
Fixed issue 16414: Question editor is not loaded when config.xml attribute has empty string as default (#1829)

All empty nodes are turned into null values, instead of an empty std objec / array. (As in LS4)
Affected Issues
16414
mod - application/helpers/questionHelper.php Diff File
mod - application/models/Question.php Diff File

Issue History

Date Modified Username Field Change
2020-06-22 19:05 gabrieljenik New Issue
2020-06-22 19:15 gabrieljenik Complete LimeSurvey version number (& build) 4.3.0 => 3.22.12
2020-06-22 19:16 gabrieljenik Product Version => 3.22.20
2020-06-22 19:16 gabrieljenik Complete LimeSurvey version number (& build) 3.22.12 => 3.22.20
2020-06-23 09:17 DenisChenu Note Added: 58393
2020-06-23 14:46 tpartner Note Added: 58404
2021-03-10 17:11 ollehar Assigned To => ollehar
2021-03-10 17:11 ollehar Status new => feedback
2021-03-10 17:11 ollehar Note Added: 63055
2021-03-29 18:12 gabrieljenik Note Added: 63714
2021-03-29 18:12 gabrieljenik Status feedback => assigned
2021-04-01 16:31 gabrieljenik Changeset attached => LimeSurvey 3.x-LTS a7b07dad
2021-04-01 16:31 gabrieljenik Note Added: 63782
2021-04-01 16:31 gabrieljenik Assigned To ollehar => gabrieljenik
2021-04-01 16:31 gabrieljenik Resolution open => fixed
2021-04-08 17:18 ollehar Status assigned => resolved