View Issue Details

This bug affects 1 person(s).
 8
IDProjectCategoryView StatusLast Update
08206Bug reportsSurvey takingpublic2013-10-09 11:22
ReporterMarksom Assigned ToDenisChenu  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version2.00+ 
Target Version2.00+Fixed in Version2.00+ 
Summary08206: Add answers to the set of labels is not possible in language code for "-" eg: pt-BR.
Description

Can not save a set of labels from the answers or subquestions. This happens only in survey that have language codes with (-), eg: pt-BR, es-CL, es-MX, es-AR ....

Realized in database 'labelset' they are being saved as ptBR, esCL, esMX, esAR ...

How to reproduce the problem?
1st- Create a survey with language pt-BR (Portuguese of Brazil).
2nd- Create a question with answer options or sub-questions.
3- Save as new set of labels.

TagsNo tags attached.
Bug heat8
Complete LimeSurvey version number (& build)
I will donate to the project if issue is resolved
Browser
Database type & version
Server OS (if known)
Webserver software & version (if known)
PHP Version

Users monitoring this issue

There are no users monitoring this issue.

Activities

DenisChenu

DenisChenu

2013-10-03 14:35

developer   ~26500

Last edited: 2013-10-03 14:35

In 2.0 ?

Tested: $POST is :
answers[pt-BR][] Un exemple d’option de réponse
answers[pt-BR][] Nouvelle option pour la réponse
code[] A1
code[] A2
laname ddd
lid 0

(PS: can not reproduce)

DenisChenu

DenisChenu

2013-10-03 14:37

developer   ~26501

Please exact reproduction and complete version information

Marksom

Marksom

2013-10-03 15:14

reporter   ~26508

My version is 2.0.

1° Create a survey with language code with (-), for example: "pt-BR".
2° Add a question with answer choices.
3° Save as set of labels.
4° Try to edit set of labels created.

He will not allow editing because it is being saved in the database in labelset as "ptBR".

DenisChenu

DenisChenu

2013-10-03 16:09

developer   ~26510

Last edited: 2013-10-03 16:13

Oh,

You're right ...

Seems not a js bug, but a php bug

Reproduce same.

mrasquinho

mrasquinho

2013-10-03 17:51

reporter   ~26511

I'm sorry, I reported this right now :)

It's not only in brazilian language, it doesn't works in other languages as well. I'm using english and it doesn't work too.

http://bugs.limesurvey.org/view.php?id=8230

DenisChenu

DenisChenu

2013-10-04 16:07

developer   ~26516

Not same bug here: CRSF protection in 2.05. ALready fixed in last GIT

Marksom

Marksom

2013-10-06 23:50

reporter   ~26562

Limesurvey always very fast!

Thank you!

DenisChenu

DenisChenu

2013-10-07 08:50

developer   ~26565

@Marksom : wit next release ;) (or take file from GIT, and don't be afraid if when auto update : LS say some files are not the same :D )

c_schmitz

c_schmitz

2013-10-09 11:22

administrator   ~26664

2.00+ Build 121009 released

Related Changesets

LimeSurvey: master 2f4458cf

2013-10-04 13:03:45

DenisChenu

Details Diff
Fixed issue: 08206: Add answers to the set of labels is not possible in language code for "-" eg: pt-BR.
Dev: remove xss filter uneeded
Dev: use sanitize_languagecodeS for language and rules for label name
Affected Issues
08206
mod - application/controllers/admin/labels.php Diff File
mod - application/helpers/admin/label_helper.php Diff File
mod - application/models/Labelsets.php Diff File

LimeSurvey: 2.05 fcc8d984

2013-10-04 14:01:47

DenisChenu

Details Diff
Fixed issue: 08206: Add answers to the set of labels is not possible in language code for "-" eg: pt-BR.
Dev: move control to rules
Dev: Add isLanguage and isLanguageMulti in LSYii_Validators : maybe best is to Add an LSlang_Validators ?
Dev: TODO : use new rules if possible
Affected Issues
08206
mod - application/controllers/admin/labels.php Diff File
mod - application/core/LSYii_Validators.php Diff File
mod - application/helpers/admin/label_helper.php Diff File
mod - application/models/LabelSet.php Diff File

Issue History

Date Modified Username Field Change
2013-09-30 00:44 Marksom New Issue
2013-10-03 14:35 DenisChenu Note Added: 26500
2013-10-03 14:35 DenisChenu Note Edited: 26500
2013-10-03 14:37 DenisChenu Project Feature requests => Bug reports
2013-10-03 14:37 DenisChenu Assigned To => DenisChenu
2013-10-03 14:37 DenisChenu Status new => assigned
2013-10-03 14:37 DenisChenu Note Added: 26501
2013-10-03 14:37 DenisChenu Status assigned => feedback
2013-10-03 15:14 Marksom Note Added: 26508
2013-10-03 15:14 Marksom Status feedback => assigned
2013-10-03 16:09 DenisChenu Note Added: 26510
2013-10-03 16:13 DenisChenu Note Edited: 26510
2013-10-03 16:13 DenisChenu Reproducibility have not tried => always
2013-10-03 16:13 DenisChenu Product Version => 2.00+
2013-10-03 16:13 DenisChenu Target Version => 2.00+
2013-10-03 17:51 mrasquinho Note Added: 26511
2013-10-04 15:09 DenisChenu Changeset attached => LimeSurvey master 2f4458cf
2013-10-04 16:03 DenisChenu Changeset attached => LimeSurvey 2.05 fcc8d984
2013-10-04 16:03 DenisChenu Status assigned => resolved
2013-10-04 16:03 DenisChenu Fixed in Version => 2.00+
2013-10-04 16:03 DenisChenu Resolution open => fixed
2013-10-04 16:07 DenisChenu Note Added: 26516
2013-10-06 23:50 Marksom Note Added: 26562
2013-10-07 08:50 DenisChenu Note Added: 26565
2013-10-09 11:22 c_schmitz Note Added: 26664
2013-10-09 11:22 c_schmitz Status resolved => closed