View Issue Details

This bug affects 1 person(s).
 8
IDProjectCategoryView StatusLast Update
09488Bug reportsSurvey takingpublic2015-02-11 15:57
Reporteraesteban Assigned ToDenisChenu  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version2.05+ 
Fixed in Version2.05+ 
Summary09488: Radix separator is allways set to the base language in javascript
Description

An error occurs when taking a multilingual multiple numerical input using the secondary language.

Steps To Reproduce

1.- Import attached survey (one question of type Multiple Numerical Input)
2.- Take the survey with main language (Spanish), everything is ok
3.- Take the survey with the secondary language (Catalan) writing at least one decimal number

Result (MYSQL): One or more questions have not been answered in a valid manner. You cannot proceed until these answers are valid.

Result (POSTGRESQL): Error executing query in dbExecuteAssoc:CDbCommand failed to execute the SQL statement: SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for type numeric: "45,4" LINE 1: ...rvey_738899 SET "lastpage"=0, "738899X20X75SQ001"='45,4', "7... ^. The SQL statement executed was: UPDATE lime_survey_738899 SET "lastpage"=0, "738899X20X75SQ001"='45,4', "738899X20X75SQ002"='5,5', "738899X20X75SQ003"='44', "738899X20X75SQ004"='4', "738899X20X75SQ005"='2,2', "738899X20X75SQ006"='2,2' WHERE ID=2

Additional Information

There is no error with the main language. There is no error with the secondary language if we don't specify decimal numbers.

TagsNo tags attached.
Attached Files
Bug heat8
Complete LimeSurvey version number (& build)553a5e60c0de78dd8970d9ca6ddf
I will donate to the project if issue is resolvedNo
BrowserFirefox
Database type & versionPostgresql 9.3 and Mysql 5.5
Server OS (if known)Ubuntu 14.04
Webserver software & version (if known)Nginx 1.4.6
PHP Version5.5.9

Users monitoring this issue

mfaber

Activities

aesteban

aesteban

2015-02-02 23:57

developer   ~31608

In main language, separator is correctly translated into english standard: dot. However, for the secondary language, the separator from GUI is directly passed to SQL statement and cause the error.

In both Catalan and Spanish the separator is comma so DB doesn't accept it as numeric type.

DenisChenu

DenisChenu

2015-02-03 10:58

developer   ~31611

Last edited: 2015-02-03 11:17

Strange issue : Same seperator (,) in js. But sperator set by survey is . for Catalan.

OK, got it. Must move call of $this->setJavascriptVar($surveyid, $_SESSION[$LEMsessid]['s_lang']); with the good language.

DenisChenu

DenisChenu

2015-02-03 11:48

developer   ~31613

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

DenisChenu

DenisChenu

2015-02-03 12:20

developer   ~31615

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

DenisChenu

DenisChenu

2015-02-03 12:31

developer   ~31616

Fixed , not closed

c_schmitz

c_schmitz

2015-02-11 15:57

administrator   ~31658

Version 2.05 Build 150211 released

Related Changesets

LimeSurvey: master d4c9c43d

2015-02-03 11:47

DenisChenu


Details Diff
Fixed issue 09488: Radix separator is allways set to the base language in javascript
Dev: use $clang->langcode like $surveyOptions
Dev: Add the $sLanguage when get surveyInfo for js var
Affected Issues
09488
mod - application/helpers/SurveyRuntimeHelper.php Diff File

LimeSurvey: 2.06 fad0653c

2015-02-03 12:20

DenisChenu


Details Diff
Fixed issue 09488: Radix separator is allways set to the base language in javascript
Dev: use App()->getLanguage() from Yii::app()
Affected Issues
09488
mod - application/helpers/SurveyRuntimeHelper.php Diff File

Issue History

Date Modified Username Field Change
2015-02-02 23:30 aesteban New Issue
2015-02-02 23:30 aesteban File Added: survey_archive_738899.lsa
2015-02-02 23:57 aesteban Note Added: 31608
2015-02-03 09:21 mfaber Issue Monitored: mfaber
2015-02-03 10:58 DenisChenu Note Added: 31611
2015-02-03 10:59 DenisChenu Note Edited: 31611
2015-02-03 10:59 DenisChenu Assigned To => DenisChenu
2015-02-03 10:59 DenisChenu Status new => assigned
2015-02-03 11:17 DenisChenu Note Edited: 31611
2015-02-03 11:35 DenisChenu Summary Impossible to take multilingual multiple numerical input => Radix separator is allways set to the base language in javascript
2015-02-03 11:48 DenisChenu Changeset attached => LimeSurvey master d4c9c43d
2015-02-03 11:48 DenisChenu Note Added: 31613
2015-02-03 11:48 DenisChenu Resolution open => fixed
2015-02-03 12:20 DenisChenu Changeset attached => LimeSurvey 2.06 fad0653c
2015-02-03 12:20 DenisChenu Note Added: 31615
2015-02-03 12:30 DenisChenu Status assigned => closed
2015-02-03 12:30 DenisChenu Fixed in Version => 2.05+
2015-02-03 12:31 DenisChenu Note Added: 31616
2015-02-03 12:31 DenisChenu Status closed => feedback
2015-02-03 12:31 DenisChenu Resolution fixed => reopened
2015-02-03 12:31 DenisChenu Status feedback => resolved
2015-02-03 12:31 DenisChenu Resolution reopened => fixed
2015-02-11 15:57 c_schmitz Note Added: 31658
2015-02-11 15:57 c_schmitz Status resolved => closed
2021-08-07 09:02 guest Bug heat 6 => 8