View Issue Details

This bug affects 1 person(s).
 8
IDProjectCategoryView StatusLast Update
08014Bug reportsAccessibilitypublic2013-09-23 13:27
Reporterhofmarkus Assigned ToDenisChenu  
PriorityhighSeverityminor 
Status closedResolutionfixed 
Product Version2.00+ 
Fixed in Version2.00+ 
Summary08014: BUG with display the correct language title {SURVEYNAME} when I use tokenlist
Description

I work with the latest stable version 2.00 Build 130708 + and have the following problem:
The survey consists of 2 languages (German-English). German is the "base language".
On the first page in template would display also the title of the survey.

If I'm work WITHOUT tokens then the survey works good (display english and german-title).

However, with the list of participants (ie, through an token-key) in the first page only the title of
the base language (here, in this case the German) would be display and when I access with the key
the title is changed to english.

For information:
Standart TEXT with "TOKEN":
This is a controlled survey. You need a valid token to participate.
If you have been issued a token, please enter it in the box below and click continue.

Token: <TOKENFIELD>

My opinion is that this is a BUG, because it works with the "old" version 1.92 Build 120919 + without problems.
For info:
PHP version: 5.3.3
Mysql: 5.1
Centos 6.4

Steps To Reproduce
  1. Make a survey with 2 languages.
  2. Write a different title for each language.
  3. Generate a tokenlist
  4. Have a look at the first page witha BASE-Language (the title is correct)
  5. Have a look at the first page witha Second-Language (the title is the same like BASE-Language)
  6. After login you could see the correct title in the correct language.
Additional Information

My opinion is that this is a BUG, because it works with the "old" version 1.92 Build 120919 + without problems.

Working version:
2.00+ Build 130708
PHP version: 5.3.3
Mysql: 5.1
Centos 6.4

TagsNo tags attached.
Attached Files
tokens_868177.csv (465 bytes)   
tid,firstname,lastname,email,emailstatus,token,language,validfrom,validuntil,invited,reminded,remindercount,completed,usesleft
"1","","","","OK","rtcmvz5jkbyuayk","en","","","N","N","0","N","1"
"2","","","","OK","xf42r3yk465sp3j","en","","","N","N","0","N","1"
"3","","","","OK","gcdu5n6hasxqdc3","de","","","N","N","0","N","1"
"4","","","","OK","hx7p6ve2gt8y4hz","de","","","N","N","0","N","1"
"5","","","","OK","eymnafjapsrxf3b","de","","","N","N","0","N","1"
tokens_868177.csv (465 bytes)   
frontend_helper.diff (565 bytes)   
--- frontend_helper_2.05b4.php	2013-07-02 21:24:04.000000000 +0200
+++ frontend_helper.php	2013-08-15 17:55:08.000000000 +0200
@@ -1321,9 +1321,10 @@
         $clang = Yii::app()->lang;
 
-        $thissurvey = getSurveyInfo($surveyid);
         if (empty($templang))
         {
             $templang=$clang->langcode;
         }
+        $thissurvey = getSurveyInfo($surveyid,$templang);
+        $languagechanger=makeLanguageChangerSurvey($clang->langcode);
 
         $_SESSION['survey_'.$surveyid]['templatename']=validateTemplateDir($thissurvey['template']);
frontend_helper.diff (565 bytes)   
Bug heat8
Complete LimeSurvey version number (& build)130708
I will donate to the project if issue is resolvedNo
BrowserFirefox, Explorer, Google chrome
Database type & versionMysql 5.1
Server OS (if known)Centos 6.4 64bit
Webserver software & version (if known)Apache 2.2.15
PHP Version5.3.3.

Users monitoring this issue

There are no users monitoring this issue.

Activities

DenisChenu

DenisChenu

2013-07-16 17:15

developer   ~25801

Lo,

What is language code from Token ?

Ca you provide a little lss file + token table ?

hofmarkus

hofmarkus

2013-07-16 18:52

reporter   ~25802

Thanks for your answer.
I make a little survey with 2 languages. Base language is German. When
i use with token (logins) then i see the "survey-german-with-language-english.png", when I open the first page in english.
When I login with a token then it display correctly in english. In german
it works correctly.

Without the tokenlist (generate automaticly the 5 tokens) it works fine.
You could see the image "survey-german-with-language-english-without-tokens.png",
when i open the fist page in english.

I hope you understand my problem?
Thank in advance.

Peter_Roes

Peter_Roes

2013-08-15 18:39

reporter   ~26000

I encountered the same issue. Also, the first page has no language changer.

I uploaded a file, frontend_helper.diff, with changes to /application/helpers/frontend_helper.php that fixes the problem for me.

Denis, please take a look whether this is the proper way to fix this issue. I am new to limesurvey.

DenisChenu

DenisChenu

2013-08-20 17:46

developer   ~26026

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

DenisChenu

DenisChenu

2013-08-20 18:27

developer   ~26027

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

c_schmitz

c_schmitz

2013-09-23 13:27

administrator   ~26327

Version 2.00+ Build 130923 released

Related Changesets

LimeSurvey: master aec56fc3

2013-08-20 15:46:35

DenisChenu

Details Diff
Fixed issue 08014: Incorrect language survey settings when access a restricted survey without token
Dev: Add language changer too (if in startpage.pstpl or survey.pstpl)
Dev: language changer work only with js, work on register or token enter
Affected Issues
08014
mod - application/controllers/survey/index.php Diff File
mod - application/helpers/frontend_helper.php Diff File

LimeSurvey: 2.05 56a1d8f0

2013-08-20 16:26:56

DenisChenu

Details Diff
Fixed issue 08014: Incorrect language survey settings when access a restricted survey without token
Dev: Add language changer too (if in startpage.pstpl or survey.pstpl)
Dev: language changer work only with js, work on register or token enter
Affected Issues
08014
mod - application/controllers/survey/index.php Diff File
mod - application/helpers/frontend_helper.php Diff File

Issue History

Date Modified Username Field Change
2013-07-15 19:44 hofmarkus New Issue
2013-07-16 17:15 DenisChenu Note Added: 25801
2013-07-16 18:47 hofmarkus File Added: limesurvey_survey_868177.lss
2013-07-16 18:47 hofmarkus File Added: survey-german-with-language-english.png
2013-07-16 18:48 hofmarkus File Added: survey-german-with-language-english-without-tokens.png
2013-07-16 18:48 hofmarkus File Added: tokens_868177.csv
2013-07-16 18:52 hofmarkus Note Added: 25802
2013-08-15 18:26 Peter_Roes File Added: frontend_helper.diff
2013-08-15 18:39 Peter_Roes Note Added: 26000
2013-08-17 18:05 DenisChenu Assigned To => DenisChenu
2013-08-17 18:05 DenisChenu Status new => assigned
2013-08-20 17:46 DenisChenu Changeset attached => LimeSurvey master aec56fc3
2013-08-20 17:46 DenisChenu Note Added: 26026
2013-08-20 17:46 DenisChenu Resolution open => fixed
2013-08-20 18:27 DenisChenu Changeset attached => LimeSurvey 2.05 56a1d8f0
2013-08-20 18:27 DenisChenu Note Added: 26027
2013-08-20 19:26 DenisChenu Status assigned => resolved
2013-08-20 19:26 DenisChenu Fixed in Version => 2.00+
2013-09-23 13:27 c_schmitz Note Added: 26327
2013-09-23 13:27 c_schmitz Status resolved => closed