View Issue Details

IDProjectCategoryView StatusLast Update
13516Bug reports[All Projects] Survey designpublic2018-11-08 18:57
ReportertpartnerAssigned ToLouisGac 
PrioritynoneSeverityminor 
Status assignedResolutionopen 
Product Version3.5.x 
Target Version4.0.0devFixed in Version 
Summary13516: Cannot access localized (i18n) values for a custom question attribute
Description

I create a custom question attribute in a custom question theme and give it a tag <i18n>true</i18n>. This results in language-dependent attribute fields in the admin view. So far, so good (attached capture-6.png & capture-7.png) .

However, when I try to access the value of that attribute in a twig file (attached capture-8.png), it returns the base-language value regardless of survey language (attached capture-4.png & capture-5.png).

Also attached a custom question theme and test survey.

TagsNo tags attached.
Complete LimeSurvey version number (& build)3.5.1
I will donate to the project if issue is resolvedNo
BrowserN/A
Database & DB-Versionmysqlnd 5.0.12-dev
Operating System (Server)Windows 10
Webserver software & versionApache/2.4.27 (Win32) OpenSSL/1.0.2l PHP/7.1.9
PHP Version7.1.9

Relationships

related to 14228 new Feature requests Theme + Question template need more information 

Activities

tpartner

tpartner

2018-03-21 22:17

developer  

capture-6.png (15,324 bytes)
capture-6.png (15,324 bytes)
capture-7.png (13,500 bytes)
capture-7.png (13,500 bytes)
capture-4.png (24,883 bytes)
capture-4.png (24,883 bytes)
capture-5.png (24,428 bytes)
capture-5.png (24,428 bytes)
limesurvey_survey_476635.lss (19,670 bytes)
autoComplete.zip (385,265 bytes)
tpartner

tpartner

2018-03-21 22:23

developer  

capture-8.png (6,480 bytes)
capture-8.png (6,480 bytes)
DenisChenu

DenisChenu

2018-03-22 10:26

developer   ~47173

I like the new question type ;)

LouisGac

LouisGac

2018-03-22 10:28

manager   ~47174

same, love it.
I'm working on the CU this week. We'll make the upgrade from 2.73 available
I'll fix the question themes problems next week

tpartner

tpartner

2018-03-22 12:18

developer   ~47186

@DenisChenu, @LouisGac, thanks - please don't judge me yet - it's a work-in-progress. :)

DenisChenu

DenisChenu

2018-05-15 15:43

developer   ~47592

Last edited: 2018-05-15 15:44

View 2 revisions

Core solution is … …
here : https://github.com/LimeSurvey/LimeSurvey/blob/master/application/models/QuestionAttribute.php#L216

And have already some (fixed) issue : https://github.com/LimeSurvey/LimeSurvey/blob/c0779ad0f1969e530ea22cdb5a6dc1ea4b0c9f9d/application/models/QuestionAttribute.php#L225

ollehar

ollehar

2018-07-10 14:58

administrator   ~48486

Is this still being worked on?

tpartner

tpartner

2018-08-14 13:31

developer   ~48778

Doesn't look like it.

LouisGac

LouisGac

2018-08-14 14:23

manager   ~48779

yes, already done and about to be bpushed ;-)

tpartner

tpartner

2018-08-23 12:54

developer   ~48864

This is still not working in the attached survey after updating to 3.14.6.

LouisGac

LouisGac

2018-08-23 12:59

manager   ~48865

still not pushed
it's a huge change behind it (XML config for each question type to replace the old attribute helper)
it's already done but will be pushed when the new feature behind it will be finished, so during the month of september.
we'll also provide a clean way to hide the question attributes (right now the solution to do that is a bit hackish)

DenisChenu

DenisChenu

2018-10-26 23:54

developer   ~49457

@LouisGac : any new on this ?

Maybe https://github.com/LimeSurvey/LimeSurvey/blob/c0779ad0f1969e530ea22cdb5a6dc1ea4b0c9f9d/application/models/QuestionAttribute.php#L164 must get question theme attribute too …

And for hidden : it's really easy since it's only one default (think 'visible', or 'adminvisble' => true) + one return in the view …

DenisChenu

DenisChenu

2018-10-27 11:26

developer   ~49460

I think we must sen,d more information in doRender fundtion in qanda :

  1. Always send qid
  2. Always send all question attribute

Currently : we don't have anything in LSETwigViewRenderer->renderQuestion , i don't find a way to know current qid …

Issue History

Date Modified Username Field Change
2018-03-21 22:17 tpartner New Issue
2018-03-21 22:17 tpartner Status new => assigned
2018-03-21 22:17 tpartner Assigned To => LouisGac
2018-03-21 22:17 tpartner File Added: capture-6.png
2018-03-21 22:17 tpartner File Added: capture-7.png
2018-03-21 22:17 tpartner File Added: capture-4.png
2018-03-21 22:17 tpartner File Added: capture-5.png
2018-03-21 22:17 tpartner File Added: limesurvey_survey_476635.lss
2018-03-21 22:17 tpartner File Added: autoComplete.zip
2018-03-21 22:22 tpartner Description Updated View Revisions
2018-03-21 22:23 tpartner File Added: capture-8.png
2018-03-22 10:26 DenisChenu Note Added: 47173
2018-03-22 10:28 LouisGac Note Added: 47174
2018-03-22 12:18 tpartner Note Added: 47186
2018-05-15 15:43 DenisChenu Note Added: 47592
2018-05-15 15:44 DenisChenu Note Edited: 47592 View Revisions
2018-05-23 13:08 LouisGac Assigned To LouisGac => dominikvitt
2018-05-28 12:55 dominikvitt Assigned To dominikvitt => LouisGac
2018-07-10 14:58 ollehar Note Added: 48486
2018-08-14 13:31 tpartner Note Added: 48778
2018-08-14 14:23 LouisGac Note Added: 48779
2018-08-23 12:54 tpartner Note Added: 48864
2018-08-23 12:59 LouisGac Note Added: 48865
2018-10-26 23:54 DenisChenu Note Added: 49457
2018-10-27 11:26 DenisChenu Note Added: 49460
2018-10-30 15:12 DenisChenu Target Version 3.5.x => 4.0.0dev
2018-11-08 18:57 DenisChenu Relationship added related to 14228