View Issue Details

IDProjectCategoryView StatusLast Update
15585Bug reportsSurvey editingpublic2020-01-27 10:13
Reportertpartner Assigned Top_teichmann  
PrioritynoneSeveritypartial_block 
Status closedResolutionfixed 
Product Version4.0.0-RC7 
Target Version4.0.x 
Summary15585: Custom question attributes not available
Description

When using a custom question theme with custom attributes, they are not available in the GUI.

See this screen-cast which shows both LS 3.x and LS 4.x - https://screencast-o-matic.com/watch/cqXbotU3K4

Steps To Reproduce
  • Upload the attached question theme - List-Radio-Test.zip.

  • Import the attached test survey - limesurvey_survey_881714.lss.

  • Ensure that the first question uses the "List-Radio-Test" theme.

  • Look for the custom attribute in the GUI.

TagsNo tags attached.
Complete LimeSurvey version number (& build)4.0.0-RC7
I will donate to the project if issue is resolvedNo
BrowserN/A
Database & DB-Versionmysqlnd 5.0.12
Server OS (if known)Windows 10
Webserver software & version (if known)Apache/2.4.39 (Win64)
PHP Version7.3.7

Activities

tpartner

tpartner

2019-11-17 16:40

developer  

List-Radio-Test.zip (6,871 bytes)
capture_2.png (27,378 bytes)   
capture_2.png (27,378 bytes)   
p_teichmann

p_teichmann

2019-12-03 15:43

administrator   ~54923

The custom_attributes got renamed to attributes. So if you replace it you should be able to see it properly, they will get merged with the ones from the base questiontype in this case "L"

tpartner

tpartner

2019-12-03 16:00

developer   ~54928

@p_teichmann, I did that after a fresh pull from git and don't see any change.

Is this documented anywhere? Does it mean that we will need two versions of every custom question theme - one for 3.x and one for 4.x?

capture_3.png (12,470 bytes)   
capture_3.png (12,470 bytes)   
capture_4.png (9,170 bytes)   
capture_4.png (9,170 bytes)   
p_teichmann

p_teichmann

2019-12-03 16:38

administrator   ~54934

I found the problem, i will fix the issue and get back to you.

We will write the documentation for it as soon as possible.

p_teichmann

p_teichmann

2020-01-13 12:38

administrator   ~55219

implemented in https://github.com/LimeSurvey/LimeSurvey/commit/99dfc5d0062c600efd2c98f0267a06488e12c319

tpartner

tpartner

2020-01-13 17:28

developer   ~55223

I don't see this as fixed after a fresh pull today - version 4.0.0-RC14.

I installed the attached question theme and, although the attributes now appear in the GUI, they don't work properly.

The buttongroup attribute seems to be stored correctly but the button remains in the "No" position regardless of the stored value.

The text attribute does not get stored at all and is not shown for multiple languages (i18n).

Please see the attache question theme and test survey.

List-Radio-Test-2.zip (7,059 bytes)
DenisChenu

DenisChenu

2020-01-15 08:20

developer   ~55249

Last edited: 2020-01-15 08:25

View 2 revisions

The buttongroup attribute seems to be stored correctly but the button remains in the "No" position regardless of the stored value.

Confirm : saved in DB, not reloaded in admin GUI

And : seems not accessible in twig part (see another plugin again ;)
question_template_attribute.multiple-email return 0

https://gitlab.com/SondagesPro/QuestionTheme/EmailInput/blob/master/survey/questions/answer/shortfreetext/text/item.twig#L17

EmailInput.zip (12,654 bytes)
DenisChenu

DenisChenu

2020-01-15 10:01

developer   ~55250

@p_teichmann : i can test : what branch to be used for maximum of fixes ?
https://github.com/LimeSurvey/LimeSurvey/commit/99dfc5d0062c600efd2c98f0267a06488e12c319 is already on develop

And

$ git reset --hard origin/develop
HEAD est maintenant à 00926bd1ef Fixed issue 15584:  Error when adding list-radio answer with code "0"
$ git pull
Déjà à jour.

See screencast done with EmailInput plugin and lss

Peek 15-01-2020 09-59.gif (1,607,093 bytes)
p_teichmann

p_teichmann

2020-01-15 10:05

administrator   ~55251

sure you can do it if you want, normally we do it internally first :)
https://github.com/LimeSurvey/LimeSurvey/tree/bug/15585-Custom-question-attributes-not-available

DenisChenu

DenisChenu

2020-01-15 10:54

developer   ~55257

For information : admin GUI seems OK now
question_template_attribute.multiple-email still return 0.

p_teichmann

p_teichmann

2020-01-15 11:18

administrator   ~55258

Last edited: 2020-01-15 11:19

View 2 revisions

Its showing for the theme i am using from tpartner in twig its {{ question_template_attribute.custom_attribute_1 }}
maybe you could give me a zip from your theme?

DenisChenu

DenisChenu

2020-01-15 11:21

developer   ~55259

Not with : https://gitlab.com/SondagesPro/QuestionTheme/EmailInput/blob/master/survey/questions/answer/shortfreetext/text/item.twig#L17

Available only in answer.twig ?

If yes : i really think theme can not be really used in production … plugin is better …

DenisChenu

DenisChenu

2020-01-15 11:21

developer   ~55260

For the zip : https://bugs.limesurvey.org/file_download.php?file_id=12496&type=bug

https://bugs.limesurvey.org/view.php?id=15585#c55249

DenisChenu

DenisChenu

2020-01-15 11:23

developer   ~55261

Maybe the - in name are an issue ?
https://gitlab.com/SondagesPro/QuestionTheme/EmailInput/blob/master/survey/questions/answer/shortfreetext/config.xml#L44

p_teichmann

p_teichmann

2020-01-15 11:35

administrator   ~55264

yes i just tested and replaced mine with - notation, this does indeed not work,
allthough i tested with other Files and oyu are able to display them in there

DenisChenu

DenisChenu

2020-01-15 12:27

developer   ~55280

OK, i update the theme to use _ :)

Must inform dev somewhere. If i reming core use _ ? No ?

DenisChenu

DenisChenu

2020-01-15 12:38

developer   ~55281

Thanks !!

confirm : issue with - : https://gitlab.com/SondagesPro/QuestionTheme/EmailInput

My 1st question theme ;)

tpartner

tpartner

2020-01-15 13:35

developer   ~55282

But the two themes that I attached work perfectly in 3.x (with dashes in the attribute names). So, they should work in 4.x. Correct?

p_teichmann

p_teichmann

2020-01-15 14:07

administrator   ~55284

@tpartner both of the once you posted here have it with "_" like custom_attribute_1
@DenisChenu yeah i think they should be updated, you have an example where its wrong?

DenisChenu

DenisChenu

2020-01-15 14:29

developer   ~55285

Last edited: 2020-01-15 14:30

View 2 revisions

But the two themes that I attached work perfectly in 3.x (with dashes in the attribute names). So, they should work in 4.x. Correct?

- is KO, _ is OK.

@pteichmann : i don't have any question theme currently. Looking at core : seems they use all ``.

I think - can not be used with twig , like .. Maybe we need to throw error in this case ? But then it's another feature request.

I don't see any manual page about questi_n theme for dev here : https://manual.limesurvey.org/Category:Development

tpartner

tpartner

2020-01-15 14:46

developer   ~55287

@tpartner both of the once you posted here have it with "_" like custom_attribute_1

Sorry, my mistake.

p_teichmann

p_teichmann

2020-01-15 15:36

administrator   ~55288

Last edited: 2020-01-15 15:37

View 2 revisions

@DenisChenu yeah thats right, i couldnt find any wrongly named attributes in the core themes

also the documentation is located at https://manualv4.limesurvey.org/Question_themes

seems like the attributes work so far, i will then push it to develop

DenisChenu

DenisChenu

2020-01-15 16:22

developer   ~55297

Maybe time to send ALL attributes in a clean array
https://bugs.limesurvey.org/view.php?id=14228#c54938

@p_teichmann : i need to make 3 feature request for 14228 ?

  1. QuestionAttribute
  2. Answers
  3. SubQuestions ?
DenisChenu

DenisChenu

2020-01-15 16:23

developer   ~55298

QuestinAttribute feature is here : https://bugs.limesurvey.org/view.php?id=14449

p_teichmann

p_teichmann

2020-01-15 16:52

administrator   ~55301

i think one should suffice.

p_teichmann

p_teichmann

2020-01-16 15:09

administrator   ~55320

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

p_teichmann

p_teichmann

2020-01-16 15:12

administrator   ~55321

pushed to https://github.com/LimeSurvey/LimeSurvey/commit/43300c524d90618db0b18d63a80ecd3a2cd84f4f

tpartner

tpartner

2020-01-16 15:36

developer   ~55323

@p_teichmann, the attribute values are now saved but there is no localization. I have an attribute that uses the <i18n> tag but in the GUI it is not rendered for all survey languages.

Do you want me to open a new bug report?

capture_3-2.png (11,037 bytes)   
capture_3-2.png (11,037 bytes)   
capture_2-2.png (7,143 bytes)   
capture_2-2.png (7,143 bytes)   
capture_4-2.png (8,529 bytes)   
capture_4-2.png (8,529 bytes)   
cdorin

cdorin

2020-01-16 16:00

manager   ~55324

@tpartner, pls open a new bug report and assign it to me/tag me

lime_release_bot

lime_release_bot

2020-01-27 10:13

administrator   ~55479

Fixed in Release 4.0.1+200120

Related Changesets

LimeSurvey: master 43300c52

2020-01-15 09:48:15

p_teichmann

Details Diff
Fixed issue 15585: Custom question attributes not available Affected Issues
15585
mod - application/models/Question.php Diff File
mod - application/models/QuestionAttribute.php Diff File
mod - application/models/QuestionTemplate.php Diff File

Issue History

Date Modified Username Field Change
2019-11-17 16:40 tpartner New Issue
2019-11-17 16:40 tpartner File Added: List-Radio-Test.zip
2019-11-17 16:40 tpartner File Added: limesurvey_survey_881714.lss
2019-11-17 16:40 tpartner File Added: capture_2.png
2019-11-17 16:40 tpartner Description Updated View Revisions
2019-11-17 16:40 tpartner Steps to Reproduce Updated View Revisions
2019-11-17 16:41 tpartner Steps to Reproduce Updated View Revisions
2019-11-20 17:23 cdorin Assigned To => cdorin
2019-11-20 17:23 cdorin Status new => assigned
2019-12-03 15:43 p_teichmann Note Added: 54923
2019-12-03 16:00 tpartner File Added: capture_3.png
2019-12-03 16:00 tpartner File Added: capture_4.png
2019-12-03 16:00 tpartner Note Added: 54928
2019-12-03 16:38 p_teichmann Note Added: 54934
2020-01-10 16:26 p_teichmann Assigned To cdorin => p_teichmann
2020-01-13 12:38 p_teichmann Status assigned => resolved
2020-01-13 12:38 p_teichmann Resolution open => fixed
2020-01-13 12:38 p_teichmann Note Added: 55219
2020-01-13 17:28 tpartner File Added: List-Radio-Test-2.zip
2020-01-13 17:28 tpartner File Added: limesurvey_survey_349347.lss
2020-01-13 17:28 tpartner Note Added: 55223
2020-01-14 09:58 JHoeck Assigned To p_teichmann => JHoeck
2020-01-14 09:58 JHoeck Status resolved => assigned
2020-01-15 08:20 DenisChenu File Added: EmailInput.zip
2020-01-15 08:20 DenisChenu Note Added: 55249
2020-01-15 08:25 DenisChenu Note Edited: 55249 View Revisions
2020-01-15 09:52 p_teichmann Assigned To JHoeck => p_teichmann
2020-01-15 09:53 p_teichmann Status assigned => testing
2020-01-15 10:01 DenisChenu File Added: limesurvey_survey_129419.lss
2020-01-15 10:01 DenisChenu File Added: Capture d’écran du 2020-01-15 10-00-10.png
2020-01-15 10:01 DenisChenu File Added: Peek 15-01-2020 09-59.gif
2020-01-15 10:01 DenisChenu Note Added: 55250
2020-01-15 10:05 p_teichmann Note Added: 55251
2020-01-15 10:54 DenisChenu Note Added: 55257
2020-01-15 11:18 p_teichmann Note Added: 55258
2020-01-15 11:19 p_teichmann Note Edited: 55258 View Revisions
2020-01-15 11:21 DenisChenu Note Added: 55259
2020-01-15 11:21 DenisChenu Note Added: 55260
2020-01-15 11:23 DenisChenu Note Added: 55261
2020-01-15 11:35 p_teichmann Note Added: 55264
2020-01-15 12:27 DenisChenu Note Added: 55280
2020-01-15 12:38 DenisChenu Note Added: 55281
2020-01-15 13:35 tpartner Note Added: 55282
2020-01-15 14:07 p_teichmann Note Added: 55284
2020-01-15 14:29 DenisChenu Note Added: 55285
2020-01-15 14:30 DenisChenu Note Edited: 55285 View Revisions
2020-01-15 14:46 tpartner Note Added: 55287
2020-01-15 15:36 p_teichmann Note Added: 55288
2020-01-15 15:37 p_teichmann Note Edited: 55288 View Revisions
2020-01-15 16:22 DenisChenu Note Added: 55297
2020-01-15 16:23 DenisChenu Note Added: 55298
2020-01-15 16:52 p_teichmann Note Added: 55301
2020-01-16 15:09 p_teichmann Changeset attached => LimeSurvey master 43300c52
2020-01-16 15:09 p_teichmann Note Added: 55320
2020-01-16 15:12 p_teichmann Status testing => resolved
2020-01-16 15:12 p_teichmann Note Added: 55321
2020-01-16 15:36 tpartner File Added: capture_3-2.png
2020-01-16 15:36 tpartner File Added: capture_2-2.png
2020-01-16 15:36 tpartner File Added: capture_4-2.png
2020-01-16 15:36 tpartner Note Added: 55323
2020-01-16 16:00 cdorin Note Added: 55324
2020-01-27 10:13 lime_release_bot Note Added: 55479
2020-01-27 10:13 lime_release_bot Status resolved => closed