View Issue Details

This bug affects 1 person(s).
 8
IDProjectCategoryView StatusLast Update
09575Bug reportsData Entry (non public)public2015-04-24 10:18
Reporterfvanderstarre Assigned Toc_schmitz  
PrioritynormalSeverityminor 
Status closedResolutionnot fixable 
Product Version2.05+ 
Summary09575: Select options for radiolist or dropdown not shown in data entry screen
Description

In data entry mode, select options are not shown for some questions (radio list/dropdown list)

Steps To Reproduce

create survey response via data entry screen (for a survey with several radio/dropdown lists)

Additional Information

works OK in L.S. 2.05+ build 140915 on PHP 5.3.3

TagsNo tags attached.
Attached Files
Bug heat8
Complete LimeSurvey version number (& build)2.05+ 150310
I will donate to the project if issue is resolvedNo
BrowserFirefox/Chrome
Database type & versionMS SQL server 2008 10.0.5500.0 (X64)
Server OS (if known)DB server: Windows NT 6.1 <X64> build 7601 SP1
Webserver software & version (if known)Linux RHEL 7
PHP Version5.4.16

Users monitoring this issue

There are no users monitoring this issue.

Activities

fvanderstarre

fvanderstarre

2015-03-19 14:24

reporter   ~31859

Also in 2.05+ build 140915 on PHP 5.4.16; so it may be PHP related?

fvanderstarre

fvanderstarre

2015-03-19 14:54

reporter   ~31860

In the attached survey, the last question is affected (radio list)

DenisChenu

DenisChenu

2015-03-21 11:23

developer   ~31873

Can not reproduce : please activate debug to 2

fvanderstarre

fvanderstarre

2015-03-23 07:52

reporter   ~31880

I activated php error logging and set debug to 2 - no php error logged.
Even when editing a completed response, where all questions are answered, the radio list is not shown for last question in this survey.

fvanderstarre

fvanderstarre

2015-03-26 09:20

reporter   ~31910

HTML snippet:
<tr class="even">
<td> dropdown</td>
<td>
<select name="956245X1790X30415">
<option value="">Selecteer..</option>
<option selected="selected" value="1">ja</option>
<option value="2">nee</option>
</select>
</td>
</tr>
<tr class="odd">
<td> radio</td>
<td>
<select name="956245X1790X30414">
<option value="">Selecteer..</option>
</select>
</td>
</tr>

You'll notice the selected option values aren't shown for question "radio".

tpartner

tpartner

2015-04-07 13:07

partner   ~31952

Works fine here:

  • Windows 8.1
  • PHP 5.5.19
  • MySQL 5.0.11
  • Apache 2.4.10 (Win32)

And here:

  • Linux
  • PHP 5.3.24
  • MySQL 5.5.37
  • Apache 2.2.24 (Unix)
fvanderstarre

fvanderstarre

2015-04-07 14:21

reporter   ~31953

Problem seems to be somewhere around line # 742 in dataentry.php:

$lquery = "SELECT * FROM {{answers}} WHERE qid={$fname['qid']} AND language = '{$sDataEntryLanguage}' ORDER BY sortorder, answer";
$lresult = dbExecuteAssoc($lquery);

On iterating through questions type "!" and "L", the second/last one doesn't seem to yield any result there (foreach loop on line # 750 is executed for the first one only, in this case the type dropdown list question).

c_schmitz

c_schmitz

2015-04-07 15:46

administrator   ~31954

Did you configure FreeTDS correctly?

fvanderstarre

fvanderstarre

2015-04-07 15:51

reporter   ~31955

....

Microsoft SQL Server 2005 configuration

[ms-sql-t263]
host = ms-sql-t263
port = 1433
tds version = 8.0
client charset = UTF-8
....

(same as other system mentioned above (RHEL 5, php 5.3)

c_schmitz

c_schmitz

2015-04-07 15:57

administrator   ~31956

Most likely PHP related since it works on newer version. Maybe the MSSQL driver has some kind of problem in that version. You would only find out by upgrading your PHP version. I see this as a no fix required.

fvanderstarre

fvanderstarre

2015-04-07 16:47

reporter   ~31959

The point is, it DOES work on php 5.3.3, but NOT on 5.4.16 (in my setup).

c_schmitz

c_schmitz

2015-04-08 09:23

administrator   ~31960

Yes, understood. But 5.4.16 is just some version in the 5.4 series. So update to any later 5.4.x version (best would be probably the latest one, 5.4.38) and see if the issue is gone.
It does not seem to exist on 5.5, anyway.

fvanderstarre

fvanderstarre

2015-04-09 08:09

reporter   ~31969

To me 5.4.16 is a newer version ;). Our Unix administrators will only support Linux/php installations based on official Red Hat repositories (that's why we've been stuck for so long on 5.3.3). So I'm not at liberty to update PHP beyond this (5.4.16) version!

fvanderstarre

fvanderstarre

2015-04-09 15:11

reporter   ~31975

I managed (with a little help from my friends) to solve the problem for type "!" and "L" questions by adding "unset($lresult);" before "$lresult = dbExecuteAssoc($lquery);", in dataentry.php (lines 743 & 2043).
Other question types may still be affected though.

c_schmitz

c_schmitz

2015-04-09 15:22

administrator   ~31976

Sounds like a memory issue. Can you raise you memory limit in PHP and see if that helps? (without your fix applied ofc).

fvanderstarre

fvanderstarre

2015-04-09 15:29

reporter   ~31977

PHP memory set to 256M (from 128) - makes no difference (fix removed), option display problem still there...

c_schmitz

c_schmitz

2015-04-09 17:17

administrator   ~31979

Well, if it is not a problem of memory then it confirms to be a issue in the PHP version. Unsetting the variable should not help :-)

DenisChenu

DenisChenu

2015-04-10 08:21

developer   ~31980

Yep, Sure.

In PHP:
$array=array("2");

and
unset($array);
$array=array("2");

Is exactly the same thing .... no difference except one useless instruction.

fvanderstarre

fvanderstarre

2015-04-13 07:47

reporter   ~31986

In this php version (5.4.16), on my systems, whenever you see a construct in LimeSurvey code like this:

$lresult = dbExecuteAssoc($lquery);
...
foreach ($lresult->readAll() as $llrow)
{...}

it seems only the first iteration goes OK (see also issue 09600).
When I put "unset($result);" before the first line, it works. I don't know how or why, but it does.
Which php version should I upgrade to to prevent the problem?

fvanderstarre

fvanderstarre

2015-04-24 10:06

reporter   ~32051

Problem solved in PHP 5.4.40

c_schmitz

c_schmitz

2015-04-24 10:18

administrator   ~32053

Great.

Issue History

Date Modified Username Field Change
2015-03-19 14:12 fvanderstarre New Issue
2015-03-19 14:12 fvanderstarre File Added: limesurvey_survey_956245.lss
2015-03-19 14:24 fvanderstarre Note Added: 31859
2015-03-19 14:54 fvanderstarre Note Added: 31860
2015-03-21 11:23 DenisChenu Note Added: 31873
2015-03-23 07:52 fvanderstarre Note Added: 31880
2015-03-26 09:20 fvanderstarre Note Added: 31910
2015-04-07 13:07 tpartner Note Added: 31952
2015-04-07 14:21 fvanderstarre Note Added: 31953
2015-04-07 15:46 c_schmitz Note Added: 31954
2015-04-07 15:51 fvanderstarre Note Added: 31955
2015-04-07 15:57 c_schmitz Note Added: 31956
2015-04-07 16:47 fvanderstarre Note Added: 31959
2015-04-08 09:23 c_schmitz Note Added: 31960
2015-04-09 08:09 fvanderstarre Note Added: 31969
2015-04-09 15:11 fvanderstarre Note Added: 31975
2015-04-09 15:22 c_schmitz Note Added: 31976
2015-04-09 15:29 fvanderstarre Note Added: 31977
2015-04-09 17:17 c_schmitz Note Added: 31979
2015-04-10 08:21 DenisChenu Note Added: 31980
2015-04-13 07:47 fvanderstarre Note Added: 31986
2015-04-24 10:06 fvanderstarre Note Added: 32051
2015-04-24 10:18 c_schmitz Note Added: 32053
2015-04-24 10:18 c_schmitz Status new => closed
2015-04-24 10:18 c_schmitz Assigned To => c_schmitz
2015-04-24 10:18 c_schmitz Resolution open => not fixable