View Issue Details

IDProjectCategoryView StatusLast Update
04672Bug reports[All Projects] Survey takingpublic2010-10-24 17:21
Reporterluke 
Assigned Toc_schmitz 
PriorityhighSeveritymajor 
Status closedResolutionfixed 
Product Version1.90+ 
Target VersionFixed in Version1.90+ 
Summary04672: Date field losing responses
DescriptionResponses already entered are not showing on the screen when using the Previous/Next buttons.
Steps To Reproduce1. The test survey is attached.
2. Go to the first group and select a valid date.
3. Click "Next"
4. Click "Previous" (the responses are there)
5. Click "Previous" again (to the start page)
6. Click "Next" (responses are gone!!!!!!!!!)
Additional InformationThe problem also occurs when using the "calendar" mode (instead of the dropdowns as in the attached survey). In step 6, a valid response gets changed to some random date.
TagsNo tags attached.
Complete LimeSurvey version number (& build)0000
I will donate to the project if issue is resolved
Browser
Database & DB-Versiondemo server
Operating System (Server)demo server
Webserver software & versiondemo server
PHP Versiondemo server

Relationships

Activities

luke

2010-10-12 21:13

reporter  

date_fields_test.lss (14,994 bytes)

Mazi

2010-10-14 15:07

developer   ~13179

I can reproduce the problem. After having gone back to the welcome screen and clicking next to get to the date question, the following errors are shown on top at the date questions:
Notice: Undefined offset: 2 in C:\xampp\htdocs\limeSOURCE\limesurvey_svn\qanda.php on line 1572

Notice: Undefined offset: 1 in C:\xampp\htdocs\limeSOURCE\limesurvey_svn\qanda.php on line 1572

luke

2010-10-15 00:44

reporter   ~13196

Anishseth, could you please post the patch details here or send me a private message on forums? I need to fix this bug in my 1.87ver based survey (I can not upgrade as my code is already customized). Please let me know. Thanks.

user7171

2010-10-15 08:55

 

patch04672.patch (1,014 bytes)
Index: qanda.php
===================================================================
--- qanda.php	(revision 9220)
+++ qanda.php	(working copy)
@@ -154,6 +154,7 @@
 // if $currentgid is not null (Group by group survey), the fieldname depends on the groupId
 function retrieveJSidname($cd,$currentgid=null)
 {
+
     global $dbprefix, $connect, $dropdownthreshold;
 
     if (preg_match("/^\+{0,1}[0-9]+X([0-9]+)X(.*)$/",$cd[2]) == 0)
@@ -1549,8 +1550,11 @@
 
     if (trim($qidattributes['dropdown_dates'])!=0) {
         if (!empty($_SESSION[$ia[1]]))
-        {
-            list($currentyear, $currentmonth, $currentdate) = explode('-', $_SESSION[$ia[1]]);
+        {   @list($currentyear, $currentmonth, $currentdate) = explode('-', $_SESSION[$ia[1]]);
+            if($currentmonth=="")
+            {
+                list($currentdate,$currentmonth,$currentyear) = explode('.',$_SESSION[$ia[1]]);
+            }          
         } else {
             $currentdate='';
             $currentmonth='';
patch04672.patch (1,014 bytes)

user7171

2010-10-15 08:56

  ~13197

Last edited: 2010-10-15 08:56

View 2 revisions

Hey Luke, I am uploading the patch here, however it is just a temporary workaround, a proper patch will be committed soon.

DenisChenu

2010-10-16 21:27

developer   ~13215

anishseth, but when i found 04671 resolving. Seem to work with this one TOO.

Now LS don't change $_POST varaible.

Can you confirm the resolution in 9259, please.

user7171

2010-10-16 23:13

  ~13220

Hey Shnoulle,

I am unable to infer what you wanna say in the first line, As far as the second and third line is concerned, i have checked it and as far as i know it is still not working the way it should in the rev 9259. Correct me if i am wrong.Thanks.

DenisChenu

2010-10-18 12:54

developer   ~13230

Hi anishseth, sorry, i made an error, i don't read whole bug reprot, and i don't see if we came at start ....

Sorry !

user7171

2010-10-18 17:11

  ~13232

Hey Luke, I am afraid that upgrade is the only option.

luke

2010-10-18 18:39

reporter   ~13234

anishseth, are you saying that the patch will not be a "one liner" ?

user7171

2010-10-20 13:29

  ~13288

Last edited: 2010-10-20 13:54

View 2 revisions

no, i am saying that the patch is based on other changes in 1.90 and cannot be backported (at least not with reasonable effort)

lemeur

2010-10-20 22:14

developer   ~13292

I think I've fixed this in patch 9289.
Can anyone test?

Thibault

user7171

2010-10-21 16:09

  ~13300

Hey Thibault,

The loosing date was fixed and committed earlier i think, however the weird date coming out still needs to be fixed, and is not fixed in 9289.

Anish

c_schmitz

2010-10-21 21:20

administrator   ~13302

Fixed in rev 9294

c_schmitz

2010-10-24 17:21

administrator   ~13325

1.90plus version released.

Issue History

Date Modified Username Field Change
2010-10-12 20:36 luke New Issue
2010-10-12 21:13 luke File Added: date_fields_test.lss
2010-10-14 09:20 user7171 Assigned To => user7171
2010-10-14 09:20 user7171 Status new => assigned
2010-10-14 15:07 Mazi Note Added: 13179
2010-10-14 18:22 user7171 File Added: patch04672.patch
2010-10-14 22:52 c_schmitz File Deleted: patch04672.patch
2010-10-15 00:44 luke Note Added: 13196
2010-10-15 08:55 user7171 File Added: patch04672.patch
2010-10-15 08:56 user7171 Note Added: 13197
2010-10-15 08:56 user7171 Note Edited: 13197 View Revisions
2010-10-16 21:27 DenisChenu Note Added: 13215
2010-10-16 21:27 DenisChenu Status assigned => resolved
2010-10-16 21:27 DenisChenu Fixed in Version => 1.90+
2010-10-16 21:27 DenisChenu Resolution open => fixed
2010-10-16 23:13 user7171 Note Added: 13220
2010-10-16 23:17 c_schmitz Status resolved => assigned
2010-10-18 12:54 DenisChenu Note Added: 13230
2010-10-18 17:11 user7171 Note Added: 13232
2010-10-18 18:39 luke Note Added: 13234
2010-10-20 13:29 user7171 Note Added: 13288
2010-10-20 13:54 c_schmitz Note Edited: 13288 View Revisions
2010-10-20 22:14 lemeur Note Added: 13292
2010-10-20 22:14 lemeur Status assigned => feedback
2010-10-21 16:09 user7171 Note Added: 13300
2010-10-21 21:20 c_schmitz Note Added: 13302
2010-10-21 21:20 c_schmitz Status feedback => resolved
2010-10-21 21:20 c_schmitz Assigned To user7171 => c_schmitz
2010-10-24 17:21 c_schmitz Note Added: 13325
2010-10-24 17:21 c_schmitz Status resolved => closed
2010-10-25 00:18 c_schmitz Category Survey at Runtime => Survey taking