View Issue Details

This bug affects 1 person(s).
 16
IDProjectCategoryView StatusLast Update
07302Bug reportsConditionspublic2013-03-11 15:04
Reportercamills Assigned Toc_schmitz  
PriorityurgentSeveritypartial_block 
Status closedResolutionfixed 
Product Version2.00+ 
Fixed in Version2.00+ 
Summary07302: entering a number with a decimal causes the entry to be reset to zero
Description

Using the numerical input question is fine until a decimal is used (with and without validation strings)where the value of the input is reset on entering the next question group. I am not aware of any 'master' default pref - the question parameter 'integer only' is set to 'no'.

Steps To Reproduce

Have tested in and out of context of current project, with and with out perl validation strings (copied from LS manual). Have created sep survey to illustrate this across three different entry types. see attached. The results are the same in each case.

TagsNo tags attached.
Attached Files
numbertest.lss (16,019 bytes)
Bug heat16
Complete LimeSurvey version number (& build)130213
I will donate to the project if issue is resolvedYes
Browser
Database type & versionSQL
Server OS (if known)LINUX
Webserver software & version (if known)Apache 2.2.23
PHP Version5.2.17

Relationships

has duplicate 07306 closedc_schmitz decimals not saved in numeric question (survey taking) 

Users monitoring this issue

There are no users monitoring this issue.

Activities

Mazi

Mazi

2013-02-15 09:49

updater   ~24090

I can NOT reproduce this issue using build 130213. You can test here: http://www.limesurvey-templates.com/20/index.php/survey/index/sid/129549/newtest/Y/lang/en

Nevertheless I am pretty sure that this bug exists since it was reported twice.

My system details:

  • PHP 5.3.2
  • Ubuntu server
  • Apache 2
  • MySQL 5.1.6

Using an older build I can also NOT reproduce the problem. System details are:

  • PHP 5.3.1
  • Win 7
  • Apache 2
  • MySQL 5.1.41
camills

camills

2013-02-15 11:14

reporter   ~24105

Here is a link to my test in situ - the issue is pretty clear.

http://www.nrgstrategy.com/total-energy-survey/index.php/129549/lang-en

TMSWhite

TMSWhite

2013-02-16 04:24

reporter   ~24123

I can't reproduce the problem with the survey or at the nrgstrategy website.

If I enter a number with a decimal, it is fine. However, if I try to add a second decimal (like 12.34.56), the whole number disappears as soon as I type the second decimal. That is expected, since each time you type a character, JavaScript removes non-numeric keystrokes and checks whether the value is a valid number. The function that does this is fixnum_checkconditions()

camills

camills

2013-02-16 10:43

reporter   ~24124

Thanks for all your time. Marcel's version also works fine for me, but my version I cannot get to work on any of three machines and the major PC browsers. Here is a short screen video to show you the issue I am facing.

http://www.screencast.com/t/J017hXBim

Just so you know, the main survey I am building requires measurement units to be entered in either cms or inches. some people will definitely need/ want to use decimals, but it cannot be forced - and resorting to just integers will make it a very blunt instrument indeed!

Just to clarify the issue is with a single decimal entered in a cell without any validation string, and then also with a validation string as that also does not work for me (and perhaps the two are connected).

http://www.screencast.com/t/J017hXBim

c_schmitz

c_schmitz

2013-02-16 21:12

administrator   ~24132

camills, I cannot reproduce it here locally, either.

However I can see the problem on the nrgstrategy website. To rule out that you for some reasons are using old LimeSurvey files please update manually (= NOT using ComfortUpdate) to the latest build (do it even if it is the one you are already running). Before trying again please clear your browser cache, too.

It is not a issue of the PHP version, I checked that one.

camills

camills

2013-02-17 22:30

reporter   ~24135

I have now manually reinstalled the whole of limesurvey on my server. Same result. Please check the link at your end to see if there is any change just in case. I guess my only hope unless you can help is to move my survey to a different server. That will have to wait until next week.

c_schmitz

c_schmitz

2013-02-18 10:02

administrator   ~24140

Trying on a different server is your best bet.
Another option is that you give us access to your server (we would need at least FTP access and a login to the affected installation) and we will directly check what's going wrong. Everything would be treated confidentially, ofc. My email address is carsten.schmitz@limesurvey.org

c_schmitz

c_schmitz

2013-02-24 15:55

administrator   ~24223

Feedback please?

camills

camills

2013-02-25 10:15

reporter   ~24250

Thanks for the offer - I have just now moved the survey to a new host (infrenion) from the previous one (bluehost). The decimal issue appears to have resolved itself and now works fine. There are other issues with some scripts (Mazi is looking into this, as they are his)but it does look as though the issue I reported was caused by something in the bluehost setup. If you want to look into this further I am happy to supply any further details or to give you access to the bluehost ftp. For my part - as i know time is tight for all of us - I will just continue with my new host set up and not set up any further surveys on bluehost!

c_schmitz

c_schmitz

2013-02-25 10:52

administrator   ~24252

In general I would still like to know the cause of this so if you can provide the access data , that would be great.

c_schmitz

c_schmitz

2013-03-01 15:55

administrator   ~24454

Pretty please?

c_schmitz

c_schmitz

2013-03-05 08:33

administrator   ~24523

camills?

Mazi

Mazi

2013-03-05 12:15

updater   ~24543

Colin will provide you with the required information for debugging this weird issue the next days.

c_schmitz

c_schmitz

2013-03-07 13:14

administrator   ~24569

Last edited: 2013-03-07 13:25

The issue is caused by a buggy version of the GMP library(4.3.2) used by LimeSurvey to be able to handle large decimal numbers with high precision.
Now if that version (or lower) is detected the normal precision functions are used instead.

c_schmitz

c_schmitz

2013-03-07 13:19

administrator   ~24570

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=11790

Mazi

Mazi

2013-03-07 14:11

updater   ~24571

Good catch!

c_schmitz

c_schmitz

2013-03-07 22:39

administrator   ~24579

Fix committed to 2.05 branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=11800

c_schmitz

c_schmitz

2013-03-11 15:04

administrator   ~24628

2.00+ build 130311 released

Related Changesets

LimeSurvey: master 5828456d

2013-03-07 12:18:13

c_schmitz

Details Diff
Fixed issue 07302: Entering a number with a decimal causes the entry to be reset to zero Affected Issues
07302
mod - application/helpers/sanitize_helper.php Diff File

LimeSurvey: 2.05 cd34b858

2013-03-07 12:18:13

c_schmitz

Details Diff
Fixed issue 07302: Entering a number with a decimal causes the entry to be reset to zero Affected Issues
07302
mod - application/helpers/sanitize_helper.php Diff File

Issue History

Date Modified Username Field Change
2013-02-14 16:50 camills New Issue
2013-02-14 16:50 camills File Added: numbertest.lss
2013-02-15 09:43 Mazi Relationship added has duplicate 07306
2013-02-15 09:49 Mazi Note Added: 24090
2013-02-15 09:49 Mazi Assigned To => c_schmitz
2013-02-15 09:49 Mazi Status new => assigned
2013-02-15 11:14 camills Note Added: 24105
2013-02-16 04:24 TMSWhite Note Added: 24123
2013-02-16 10:43 camills Note Added: 24124
2013-02-16 21:12 c_schmitz Note Added: 24132
2013-02-16 21:14 c_schmitz Status assigned => feedback
2013-02-17 22:30 camills Note Added: 24135
2013-02-17 22:30 camills Status feedback => assigned
2013-02-18 10:02 c_schmitz Note Added: 24140
2013-02-18 10:02 c_schmitz Status assigned => feedback
2013-02-24 15:55 c_schmitz Note Added: 24223
2013-02-25 10:15 camills Note Added: 24250
2013-02-25 10:15 camills Status feedback => assigned
2013-02-25 10:52 c_schmitz Note Added: 24252
2013-02-25 10:52 c_schmitz Status assigned => feedback
2013-03-01 15:55 c_schmitz Note Added: 24454
2013-03-05 08:33 c_schmitz Note Added: 24523
2013-03-05 12:15 Mazi Note Added: 24543
2013-03-06 16:27 c_schmitz Status feedback => assigned
2013-03-07 13:14 c_schmitz Note Added: 24569
2013-03-07 13:14 c_schmitz Status assigned => resolved
2013-03-07 13:14 c_schmitz Fixed in Version => 2.00+
2013-03-07 13:14 c_schmitz Resolution open => fixed
2013-03-07 13:19 c_schmitz Changeset attached => LimeSurvey master 5828456d
2013-03-07 13:19 c_schmitz Note Added: 24570
2013-03-07 13:25 c_schmitz Note Edited: 24569
2013-03-07 14:11 Mazi Note Added: 24571
2013-03-07 22:39 c_schmitz Changeset attached => LimeSurvey 2.05 cd34b858
2013-03-07 22:39 c_schmitz Note Added: 24579
2013-03-11 15:04 c_schmitz Note Added: 24628
2013-03-11 15:04 c_schmitz Status resolved => closed