View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
08546 | Bug reports | Survey taking | public | 2014-01-16 15:48 | 2014-01-25 17:22 |
Reporter | finnnns | Assigned To | DenisChenu | ||
Priority | normal | Severity | tweak | ||
Status | closed | Resolution | fixed | ||
Product Version | 2.05+ | ||||
Fixed in Version | 2.05+ | ||||
Summary | 08546: JavaScript Expression Manager rtrim numeric value (not PHP) | ||||
Description | This happens in the following context: | ||||
Steps To Reproduce | Create a matrix question with at least a subquestion having at least two input fields Set a question validation tip to be displayed, the (negative) same condition having a message and none for the opposite Test the survey | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
Bug heat | 10 | ||||
Complete LimeSurvey version number (& build) | 2.05 131219 | ||||
I will donate to the project if issue is resolved | No | ||||
Browser | Firefox | ||||
Database type & version | mySQL 5.1.66 latest DB-Version | ||||
Server OS (if known) | Debian GNU/Linux 6.0.7 (squeeze) | ||||
Webserver software & version (if known) | Apache | ||||
PHP Version | 5.3.3-7+squeeze15 | ||||
Hi strange here, because i can not reproduce on my installation.(test link : http://limesurvey.sondages.pro/survey/index/sid/562757/newtest/Y) Can you test with last version please (from today). If not OK : please : can you put complete PHP info. |
|
With Release 2.05+ Build 140116 please :) |
|
Yes I could reproduce it in http://limesurvey.sondages.pro/survey/index/sid/562757/newtest/Y as well as in my own 2.05+ Build 140116. |
|
Yes, you're right: better understanding now : with trailing space it's different. And it's only trailing space ...... You can do this : PS: not a server difference, no need phpinfo ;) |
|
Reminder sent to: c_schmitz Hi Carsten, don't know what to do here: For js is_numeric("12 ") is true (not is_numeric(" 12").) Did we trim allways or not ? |
|
Glad not having to send the phpinfo. |
|
It's not finesse ;). But here i really don't know what is best ..... is_numeric("12 ") false or true ? I thing false (like PHP) but not sure it's break another survey. What is your opinion on this? And when we export : for OOcalc "12 " become 12 or not ? And for spss ? And for other expression .... |
|
I think the behaviour between PHP and JS should be the same. That way the problem will be gone. |
|
{q1_sq1_sq2.NAOK+q1_sq1_sq2.NAOK} In JS: In PHP: |
|
I fix first LEMval to never rtrim value, see for is_numeric after. Maybe phpjs can be extrenal for EM, but have a lot of function uneeded (actually). |
|
phpjs seems have same issue here: |
|
hehe, lets submit a bug report ;) |
|
ha, I see you already did ;) |
|
Yes and make a pull request: This work good on LS. Do the pull for LS and update with newer pĥpjs if needed (surely better). |
|
Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=13713 |
|
Fix JS to have same way than PHP. Fix too is_int for all traing slash. |
|
2.05+ Build 140125 released |
|
LimeSurvey: master 5099401e 2014-01-18 15:57 Details Diff |
Fixed issue 08546: JavaScript Expression Manager rtrim numeric value (not PHP) Dev: use phpjs function AND fix LEMval Dev: fix is_int with phpjs too Dev: PHP is_float return allways false for QCODE actually : TODO add exprmgr_int (same in 2.00) |
Affected Issues 08546 |
|
mod - scripts/expressions/em_javascript.js | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2014-01-16 15:48 | finnnns | New Issue | |
2014-01-16 15:48 | finnnns | File Added: limesurvey_is_numeric.lss | |
2014-01-16 15:49 | finnnns | File Added: screen01.png | |
2014-01-16 15:49 | finnnns | File Added: screen02.png | |
2014-01-16 15:49 | finnnns | File Added: screen03.png | |
2014-01-16 15:49 | finnnns | File Added: screen04.png | |
2014-01-16 15:49 | finnnns | File Added: screen05.png | |
2014-01-16 15:50 | finnnns | Issue Monitored: finnnns | |
2014-01-16 16:19 | c_schmitz | Assigned To | => DenisChenu |
2014-01-16 16:19 | c_schmitz | Status | new => assigned |
2014-01-16 18:34 | DenisChenu | Note Added: 27921 | |
2014-01-16 18:35 | DenisChenu | Note Added: 27922 | |
2014-01-16 18:35 | DenisChenu | Status | assigned => feedback |
2014-01-17 08:08 | finnnns | Note Added: 27930 | |
2014-01-17 08:08 | finnnns | Status | feedback => assigned |
2014-01-17 08:08 | finnnns | File Added: 08546.png | |
2014-01-17 08:09 | finnnns | Note Edited: 27930 | |
2014-01-17 08:27 | DenisChenu | Note Added: 27931 | |
2014-01-17 08:27 | DenisChenu | Summary | is_numeric not behaving consistently between validation and validation help text, depending on erraneous value => JS and PHP difference between is_numeric : JS rtrim value, not PHP |
2014-01-17 08:29 | DenisChenu | Issue Monitored: c_schmitz | |
2014-01-17 08:29 | DenisChenu | Note Added: 27932 | |
2014-01-17 08:30 | DenisChenu | Note Edited: 27931 | |
2014-01-17 08:47 | finnnns | Note Added: 27933 | |
2014-01-17 09:10 | DenisChenu | Note Added: 27935 | |
2014-01-17 09:14 | c_schmitz | Note Added: 27936 | |
2014-01-17 09:14 | DenisChenu | Note Added: 27937 | |
2014-01-17 09:14 | c_schmitz | Note Edited: 27936 | |
2014-01-17 09:16 | DenisChenu | Summary | JS and PHP difference between is_numeric : JS rtrim value, not PHP => JavaScript Expression Manager rtrim numeric value |
2014-01-17 09:16 | DenisChenu | Summary | JavaScript Expression Manager rtrim numeric value => JavaScript Expression Manager rtrim numeric value (not PHP) |
2014-01-17 09:45 | DenisChenu | Note Added: 27941 | |
2014-01-17 14:42 | DenisChenu | Note Added: 27959 | |
2014-01-17 15:13 | c_schmitz | Note Added: 27960 | |
2014-01-17 15:14 | c_schmitz | Note Added: 27961 | |
2014-01-17 16:31 | DenisChenu | Note Added: 27965 | |
2014-01-18 15:57 | DenisChenu | Changeset attached | => LimeSurvey master 5099401e |
2014-01-18 15:57 | DenisChenu | Note Added: 27984 | |
2014-01-18 15:57 | DenisChenu | Resolution | open => fixed |
2014-01-18 15:59 | DenisChenu | Note Added: 27985 | |
2014-01-18 15:59 | DenisChenu | Status | assigned => resolved |
2014-01-18 15:59 | DenisChenu | Fixed in Version | => 2.05+ |
2014-01-25 17:22 | c_schmitz | Note Added: 28161 | |
2014-01-25 17:22 | c_schmitz | Status | resolved => closed |
2021-08-03 01:11 | guest | Bug heat | 6 => 10 |