View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
03394 | Bug reports | Survey taking | public | 2009-06-23 12:53 | 2009-08-31 15:12 |
Reporter | mdekker | Assigned To | c_schmitz | ||
Priority | normal | Severity | partial_block | ||
Status | closed | Resolution | fixed | ||
Product Version | 1.85+ | ||||
Fixed in Version | 1.85+ | ||||
Summary | 03394: Drop down datefield incorrect to database | ||||
Description | A datefield with the drop down display gets inserted incorrect to my database. I tried with english and dutch locale but both are incorrect. My survey has dutch locale as default language, which should give dd-mm-yyyy as a date format. When I use the normal datepicker the date gets to the database correctly. EDIT: Also the drop down field gives a validation error and then without change i can submit. | ||||
Additional Information | Changing line 1090 in qanda.php from <input type="hidden" id="dateformat'.$ia[1].'" value="'.$dateformatdetails['jsdate'].'"/>'; to seems to do the trick, please have a look. | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
Bug heat | 6 | ||||
Complete LimeSurvey version number (& build) | |||||
I will donate to the project if issue is resolved | |||||
Browser | |||||
Database type & version | Mysql | ||||
Server OS (if known) | FreeBSD | ||||
Webserver software & version (if known) | apache | ||||
PHP Version | 5.x | ||||
@ c_schmitz: please review the suggested modification. |
|
changing that line doesn't work... the format should be lowercased I think... for input date day=20 month=6 year=2009 i now get 20.6.Y |
|
Which build number? |
|
I use latest svn, at the moment I use 07167 |
|
The data is always written in the database in the same format. The only thing you can change in the langage tab is how it is displayed ot the user. |
|
The problem is that the data won't be recorded correctly. It uses three fields for input that need to be transfered to one date field in a particular order. I noticed that only the day and month get into that date field, and mysql doesn't know how to handle a date like "20.6.Y" so I get incorrect dates. The normal datepicker works ok, but the drop down dates are the problem. I think the problems is in the code where the separate elements are put into one database variable. I don't know the inner workings, but maybe the definition of the databasefield shouldn't be localised at all then, but just yyyy-mm-dd as mysql expects it. |
|
Ok I changed my databse field to be a text field so no conversion done by mysql. I have 2 languages: english and dutch. I input june 21 2009 and this is what gets into the database: dutch: 2000-06-21 Just one other strange thing... the startlanguage is in both cases nl, where i expected to see en for the last case. A dump on the postvars shows 306 = datepicker, 311 = dropdown [18491X67X306] => 21.06.2009 [18491X68X311] => 21.6.Y for english: [18491X67X306] => 06-21-2009 [18491X68X311] => 6-21-Y |
|
I still can't reproduce. |
|
I'm going crazy now... I tried this a hundred times and always got wrong dates in the database and now I try again it just works as it is supposed to. Ok the problem is a little bit different (I will attach the sample survey in a minute). When the form validates there is no problem, but when I get a validation warning something goes wrong. It forgets the year for the drop down box. After the first validation error it shows ok on the screen, but after the second submit you can see on screen the year box is empty. |
|
Attached the survey. Try to not answer the mandatory question. Then submit a few times and see what happens. |
|
I still can't reproduce it. |
|
I'll attach screenshots... I take the survey in Nederlands / Dutch. Don't answer the first question and put in todays date for datepicker and drop down date. Now submit... (versturen). After you click ok to error message the date in the datepicker is wrong and drop down date is empty. |
|
Thank you very much. Guess it is fixed now. |
|
Date Modified | Username | Field | Change |
---|---|---|---|
2009-06-23 12:53 | mdekker | New Issue | |
2009-06-23 12:53 | mdekker | Status | new => assigned |
2009-06-23 12:53 | mdekker | Assigned To | => user372 |
2009-06-23 12:53 | mdekker | Database & DB-Version | => Mysql |
2009-06-23 12:53 | mdekker | Operating System (Server) | => FreeBSD |
2009-06-23 12:53 | mdekker | Webserver | => apache |
2009-06-23 12:53 | mdekker | PHP Version | => 5.x |
2009-06-23 12:54 | mdekker | Description Updated | |
2009-06-23 14:27 | mdekker | Additional Information Updated | |
2009-06-23 14:28 | mdekker | Additional Information Updated | |
2009-06-23 14:32 |
|
Assigned To | user372 => c_schmitz |
2009-06-23 14:32 |
|
Note Added: 08641 | |
2009-06-23 14:33 | mdekker | Note Added: 08642 | |
2009-06-23 15:12 | c_schmitz | Note Added: 08645 | |
2009-06-23 15:28 | mdekker | Note Added: 08646 | |
2009-06-24 11:43 | c_schmitz | Note Added: 08657 | |
2009-06-24 12:11 | mdekker | Note Added: 08659 | |
2009-06-24 13:06 | mdekker | Note Added: 08663 | |
2009-06-28 13:25 | c_schmitz | Note Added: 08704 | |
2009-06-29 10:44 | mdekker | Note Added: 08718 | |
2009-06-29 10:51 | mdekker | File Added: limesurvey_survey_71879.csv | |
2009-06-29 10:52 | mdekker | Note Added: 08719 | |
2009-08-19 10:57 | c_schmitz | Note Added: 09171 | |
2009-08-19 10:57 | c_schmitz | Status | assigned => feedback |
2009-08-25 12:33 | mdekker | Note Added: 09208 | |
2009-08-25 12:33 | mdekker | File Added: Clipboard01.jpg | |
2009-08-25 12:33 | mdekker | File Added: Clipboard02.jpg | |
2009-08-27 15:41 | c_schmitz | Note Added: 09236 | |
2009-08-27 15:41 | c_schmitz | Status | feedback => resolved |
2009-08-27 15:41 | c_schmitz | Fixed in Version | => 1.85+ |
2009-08-27 15:41 | c_schmitz | Resolution | open => fixed |
2009-08-31 15:12 | c_schmitz | Status | resolved => closed |
2010-10-25 00:18 | c_schmitz | Category | Survey at Runtime => Survey taking |