View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
15585 | Bug reports | Survey editing | public | 2019-11-17 16:40 | 2020-01-27 10:13 |
Reporter | tpartner | Assigned To | p_teichmann | ||
Priority | none | Severity | partial_block | ||
Status | closed | Resolution | fixed | ||
Product Version | 4.0.0-RC7 | ||||
Target Version | 4.0.x | ||||
Summary | 15585: 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. | ||||
Tags | No tags attached. | ||||
Complete LimeSurvey version number (& build) | 4.0.0-RC7 | ||||
I will donate to the project if issue is resolved | No | ||||
Browser | N/A | ||||
Database & DB-Version | mysqlnd 5.0.12 | ||||
Server OS (if known) | Windows 10 | ||||
Webserver software & version (if known) | Apache/2.4.39 (Win64) | ||||
PHP Version | 7.3.7 | ||||
|
|
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" | |
@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? |
|
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. |
|
implemented in https://github.com/LimeSurvey/LimeSurvey/commit/99dfc5d0062c600efd2c98f0267a06488e12c319 | |
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. |
|
> 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 |
|
@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 |
|
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 |
|
For information : admin GUI seems OK now question_template_attribute.multiple-email still return 0. |
|
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? |
|
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 … |
|
For the zip : https://bugs.limesurvey.org/file_download.php?file_id=12496&type=bug https://bugs.limesurvey.org/view.php?id=15585#c55249 |
|
Maybe the `-` in name are an issue ? https://gitlab.com/SondagesPro/QuestionTheme/EmailInput/blob/master/survey/questions/answer/shortfreetext/config.xml#L44 |
|
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 |
|
OK, i update the theme to use _ :) Must inform dev somewhere. If i reming core use _ ? No ? |
|
Thanks !! confirm : issue with `-` : https://gitlab.com/SondagesPro/QuestionTheme/EmailInput My 1st question theme ;) |
|
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? | |
@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? |
|
> 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. @p_teichmann : 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 both of the once you posted here have it with "_" like custom_attribute_1 Sorry, my mistake. |
|
@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 |
|
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 ? |
|
QuestinAttribute feature is here : https://bugs.limesurvey.org/view.php?id=14449 | |
i think one should suffice. | |
Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=29402 | |
pushed to https://github.com/LimeSurvey/LimeSurvey/commit/43300c524d90618db0b18d63a80ecd3a2cd84f4f | |
@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? |
|
@tpartner, pls open a new bug report and assign it to me/tag me | |
Fixed in Release 4.0.1+200120 | |
LimeSurvey: master 43300c52 2020-01-15 09:48:15 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 |
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 |