View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 09348 | Bug reports | Survey editing | public | 2014-11-04 05:34 | 2014-11-07 15:25 |
| Reporter | cnemmick | Assigned To | gabrieljenik | ||
| Priority | normal | Severity | minor | ||
| Status | closed | Resolution | duplicate | ||
| Product Version | 2.05+ | ||||
| Summary | 09348: PHP Notice when trying to using organizer to change question/group order | ||||
| Description | When clicking on the question/group organizer (index.php/admin/survey/sa/organize/surveyid/11111), LS2 throws a PHP Notice: Undefined Index: surveyls_dateformat. Code in /applications/helpers/expressions/em_manager_helper.php (line 3164) is causing the error by passing $LEM->surveyOptions, which is not populated with an array value for key "surveyls_dateformat". This causes function getDateFormatDataForQID (in /applications/helpers/surveytranslator_helper.php, line 798) to throw notice since key is undefined. PHP Notice exception output screenshots: | ||||
| Steps To Reproduce | Create a survey that has contains a Date/Time question that has both Minimum Date and Maximum Date values assigned. Then click on the organizer (Reorder question group/questions) button. PHP Notice will trigger. See attached .lss file for sample survey. | ||||
| Additional Information | Possible fix: replace line 3164 in /applications/helpers/expressions/em_manager_helper.php with the following: $aDateFormatData=getDateFormatDataForQID($aAttributes[$questionNum],$LEM->sid); Passing Survey ID to getDateFormatDataForQID() will load the proper date format data. A better solution may be ensuring that $LEM loads "surveyls_dateformat" from the survey settings properly. I noticed other places where getDateFormatDataForQID() is passed $LEM->surveyOptions in the Lime2 codebase; may want to double-check those instances to make sure the proper values are assigned to $LEM->surveyOptions prior to the function call. | ||||
| Tags | No tags attached. | ||||
| Attached Files | |||||
| Bug heat | 0 | ||||
| Complete LimeSurvey version number (& build) | db19b551777d408f55694cb68dfb | ||||
| I will donate to the project if issue is resolved | No | ||||
| Browser | Any | ||||
| Database type & version | MySQL 5.5 | ||||
| Server OS (if known) | Windows 2012 Server | ||||
| Webserver software & version (if known) | Apache/2.4.10 (Win32) | ||||
| PHP Version | PHP 5.5.17 | ||||
| Git branch / Pull Request URL | |||||
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2014-11-04 05:34 | cnemmick | New Issue | |
| 2014-11-04 05:34 | cnemmick | File Added: limesurvey_survey_126279.lss | |
| 2014-11-07 15:25 | DenisChenu | Relationship added | duplicate of 09332 |
| 2014-11-07 15:25 | DenisChenu | Status | new => closed |
| 2014-11-07 15:25 | DenisChenu | Assigned To | => gabrieljenik |
| 2014-11-07 15:25 | DenisChenu | Resolution | open => duplicate |
| 2019-11-01 17:25 | c_schmitz | Category | Survey design => Survey editing |