View Issue Details

This bug affects 3 person(s).
 24
IDProjectCategoryView StatusLast Update
18880Bug reportsTheme editorpublic2023-09-14 16:33
ReporterDenisChenu Assigned Top_teichmann  
PrioritynoneSeveritypartial_block 
Status ready for code reviewResolutionopen 
Product Version5.6.x 
Summary18880: Unable to add imagefile except brandlogofile and backgroundimagefile in option
Description

When create new theme : we need to have more image files. I skelvanilla i have 2 more, but i think too for favicon

Steps To Reproduce

Steps to reproduce

Try to create a template with 3 images files selector with

    <engine>
        <optionspage>core</optionspage>
    </engine>

Expected result

Have a way to do it (adding imagelist for type or add it in another way)

Actual result

No way

TagsNo tags attached.
Bug heat24
Complete LimeSurvey version number (& build)5.6.25
I will donate to the project if issue is resolvedNo
Browsernot relevant
Database type & versionnot relevant
Server OS (if known)not relevant
Webserver software & version (if known)not relevant
PHP Versionnot relevant

Relationships

related to 18894 ready for code reviewollehar Not able to add theme option text input 
related to 18893 closed file list do not show in dropdowns 
related to 18895 confirmed No way to add textarea with core config.xml 
related to 19085 confirmed Theme Options with an on/off switch are not disabled when page loads 
related to 19086 confirmed Survey Theme Options: image preview does not work 

Users monitoring this issue

User List Mazi

Activities

Mazi

Mazi

2023-06-19 09:54

updater   ~75696

@ollehar, there seem to be various regressions when it comes to defining theme options at the config.xml file, see related tickets.

Since Limesurvey 6.x is already the official, latest release, can you please coordinate with the development team who can look into this? Because currently it is nearly impossible to adjust 3.x or 5.x themes due to these missing features.

Mazi

Mazi

2023-06-19 09:55

updater   ~75697

@tpartner, just pinging you here since you also work with custom themes a lot.

DenisChenu

DenisChenu

2023-06-19 10:23

developer   ~75702

@Mazi : please add This bug affects you and 1 other person(s). ;)

Mazi

Mazi

2023-06-28 11:03

updater   ~75883

@DenisChenu / @ollehar, which developer can best take care of these theme issues?

ollehar

ollehar

2023-06-28 11:52

administrator   ~75887

Last edited: 2023-06-28 11:52

Currently @p_teichmann and @twilllig are working on finishing LS6 for cloud and CU release.

ollehar

ollehar

2023-06-28 11:53

administrator   ~75888

Wait is this a bug in 5 or 6?

Mazi

Mazi

2023-06-28 12:35

updater   ~75891

@ollehar, would be happy to see these theme tickets assigned to one of them.

We noticed the issue when working on LS 6.x. But the same problem already seems to exist at 5.x. At that version the feature for theme settings at config.xml was introduced.

DenisChenu

DenisChenu

2023-06-28 12:37

developer   ~75892

Wait is this a bug in 5 or 6?

Both

ollehar

ollehar

2023-06-29 12:55

administrator   ~75902

We're still busy finishing off the new survey theme. Maybe someone else has time to pick it up?

Mazi

Mazi

2023-07-11 12:17

updater   ~76031

@ollehar, maybe you should fix broken stuff first before creating new features? Sometimes I wonder about how priorities are being set.
Currently we are not able to develop new 6.x question themes for our customers due to the config.xml issues mentioned at various bug tickets.

ollehar

ollehar

2023-07-11 14:06

administrator   ~76037

I don't decide priority, sooo. We have two designated bug fixers and one tester. We can always discuss if that's enough or not.

DenisChenu

DenisChenu

2023-07-11 16:58

developer   ~76051

Any idea on the config.xml ?

new type in https://github.com/LimeSurvey/LimeSurvey/blob/6d4934a1fcad053dbf96ac2d69ddfc02d3f79abc/themes/survey/vanilla/config.xml#L69
new attribute in https://github.com/LimeSurvey/LimeSurvey/blob/6d4934a1fcad053dbf96ac2d69ddfc02d3f79abc/themes/survey/vanilla/config.xml#L69

or new element inside
<dropdownimages></dropdownimages>

DenisChenu

DenisChenu

2023-07-11 17:00

developer   ~76052

Ps : i think we can have same issue for fonts : https://github.com/LimeSurvey/LimeSurvey/blob/6d4934a1fcad053dbf96ac2d69ddfc02d3f79abc/themes/survey/fruity/config.xml#L663

Mazi

Mazi

2023-07-11 19:06

updater   ~76053

I will leave the implementation details to the experts, I can not contribute much here. But it should be possible to define more than one image to be shown. Using the options.twig this works fine, we did that for many custim themes. But the new feature of defining the theme options at config.xml should also support this.

DenisChenu

DenisChenu

2023-07-12 08:11

developer   ~76055

I think <dropdownimages></dropdownimages> is more easy with current system

@ollehar : i can take this one : adding an optionnal <dropdownimages></dropdownimages> is OK or a new type or a new attribute ?

I prefer new type, but need a compatibility system for current brandlogofile and backgroundimagefile

ollehar

ollehar

2023-07-12 10:27

administrator   ~76057

I think @p_teichmann is better suited to leave feedback here.

p_teichmann

p_teichmann

2023-07-12 19:54

administrator   ~76066

Yeah if it is needed, i don't see why we couldn't do that. But this is a feature request as far as i see it and not a bug?

Regarding implementation i think defining a type for it would be a good idea.

Mazi

Mazi

2023-07-12 20:34

updater   ~76067

@p_teichmann, since LS 5.x already support defining theme options not via options.twig but using the config.xml file, I do not consider this a bug. It seems like this concept was never fully tested.
While you could easily add a second logo by adding the needed code to options.twig, defining this at the config.xml file currently does not work. So I consider this a bug.

DenisChenu

DenisChenu

2023-07-13 07:38

developer   ~76070

Maybe a feature (if we can still use options.twig ? )
But : create a system to allow external dev to do SurveyTheme but not usuable by external dev … clearly a broken implementation …

p_teichmann

p_teichmann

2023-07-13 12:00

administrator   ~76073

Last edited: 2023-07-13 12:08

I looked a bit at the code regarding the xml options. This whole implementation with the xml file looks very incomplete in general, will need to discuss how we want fix this.

Mazi

Mazi

2023-07-13 13:24

updater   ~76076

Thanks for looking into this, p_teichmann.

I had the same impression. The approach to use the config.xml is really great and it makes the whole template design process less error prone. But it seems the implementation is not complete, though this had become an official feature at LS 5.x.

Mazi

Mazi

2023-08-24 21:51

updater   ~76703

@ollehar, can someone please look into it? At LS 3.x and 5.x we had the option to have multiple image files. Defining the same at the config.xml at LS 6.x does not work at all.

ollehar

ollehar

2023-08-25 10:37

administrator   ~76707

I'm currently not in the application team. Someone else should have a look.

Mazi

Mazi

2023-08-25 10:42

updater   ~76709

@ollehar, could you then assign the ticket to "someone else", who ever that is...? This really is a show stopper for our templates.

ollehar

ollehar

2023-08-25 10:51

administrator   ~76710

Pinged the team. :)

Mazi

Mazi

2023-09-07 22:19

updater   ~76911

@ollehar, @c_schmitz, any updates? This really is a show stopper for template development at version 6.x. Weeks are passing by and currently we can not really create custom templates for the new version for our customers which start switching to 6.x.

gabrieljenik

gabrieljenik

2023-09-08 21:30

manager   ~76932

We are working on it. Have something to push next week

gabrieljenik

gabrieljenik

2023-09-11 16:17

manager   ~76938

https://github.com/LimeSurvey/LimeSurvey/pull/3433

gabrieljenik

gabrieljenik

2023-09-11 16:39

manager   ~76940

Some notes:

We were initially planning to convert the backgroundimagefile and brandlogofile options to the new option type (imagefile).
But I'm not sure about doing it in this ticket. Maybe it's best to leave it for later, especially due to possible implications for backward compatibility. And by converting them to the new type of option, that bug would disappear directly.

Some Bugs Found:

1) For options that have a switch, they are supposed to be disabled when set to “No”. It actually disables the field when you press it.
But when the page loads, the disabling is not applied, and it allows a value to be set even if the switch is set to “No”.

2) LS assumes that certain types of settings (ex: dropdown and duration) GOT to have a switch to activate them. Shouldn't tha be optional?

3) In the theme options of the survey, the preview does not work (it opens the modal but does not find the image).

4) If you set a background image with debug = 2, you can no longer enter the theme options.

DenisChenu

DenisChenu

2023-09-11 16:43

developer   ~76941

But I'm not sure about doing it in this ticket. Maybe it's best to leave it for later, especially due to possible implications for backward compatibility. And by converting them to the new type of option, that bug would disappear directly.

Yes : need backward compatibility.

gabrieljenik

gabrieljenik

2023-09-11 17:59

manager   ~76944

4) If you set a background image with debug = 2, you can no longer enter the theme options.

Fixed here. Included in the PR.
https://github.com/LimeSurvey/LimeSurvey/pull/3433/commits/6e722025eacfeabb4f46b6cfdbda2957e0ae64a2

gabrieljenik

gabrieljenik

2023-09-14 14:51

manager   ~77037

1) For options that have a switch, they are supposed to be disabled when set to “No”. It actually disables the field when you press it.
But when the page loads, the disabling is not applied, and it allows a value to be set even if the switch is set to “No”.

Created https://bugs.limesurvey.org/view.php?id=19085

3) In the theme options of the survey, the preview does not work (it opens the modal but does not find the image).

Created https://bugs.limesurvey.org/view.php?id=19086

The only thing to follow up on is

2) LS assumes that certain types of settings (ex: dropdown and duration) GOT to have a switch to activate them. Shouldn't tha be optional?

gabrieljenik

gabrieljenik

2023-09-14 16:31

manager   ~77049

Last edited: 2023-09-14 16:33

Sorry, forgot to attach a test theme.
Please notice in there:

<footerimage type="buttons" category="Images" width="4" title="Footer image" options="on|off" optionlabels="Yes|No">on</footerimage>
<footerimagefile type="imagefile" category="Images" width="6" title="Footer image file" parent="footerimage">./files/poweredby.png</footerimagefile>

The first tag is the switch and the second tag (type=”image file”) is the dropdown.
It should also work without the switch (also removing the parent attribute)

test_18880.zip (109,164 bytes)

Issue History

Date Modified Username Field Change
2023-06-13 16:23 DenisChenu New Issue
2023-06-16 15:08 DenisChenu Relationship added related to 18893
2023-06-19 08:24 DenisChenu Relationship added related to 18895
2023-06-19 08:31 DenisChenu Relationship added related to 18894
2023-06-19 08:32 DenisChenu Severity minor => partial_block
2023-06-19 09:54 Mazi Note Added: 75696
2023-06-19 09:54 Mazi Bug heat 0 => 2
2023-06-19 09:54 Mazi Issue Monitored: Mazi
2023-06-19 09:54 Mazi Bug heat 2 => 4
2023-06-19 09:55 Mazi Note Added: 75697
2023-06-19 10:23 DenisChenu Note Added: 75702
2023-06-19 10:23 DenisChenu Bug heat 4 => 6
2023-06-19 10:36 Mazi Bug heat 6 => 12
2023-06-28 11:03 Mazi Note Added: 75883
2023-06-28 11:52 ollehar Note Added: 75887
2023-06-28 11:52 ollehar Bug heat 12 => 14
2023-06-28 11:52 ollehar Note Edited: 75887
2023-06-28 11:52 ollehar Note Edited: 75887
2023-06-28 11:53 ollehar Note Added: 75888
2023-06-28 12:35 Mazi Note Added: 75891
2023-06-28 12:37 DenisChenu Note Added: 75892
2023-06-29 12:55 ollehar Note Added: 75902
2023-07-11 12:17 Mazi Note Added: 76031
2023-07-11 14:06 ollehar Note Added: 76037
2023-07-11 16:58 DenisChenu Note Added: 76051
2023-07-11 17:00 DenisChenu Note Added: 76052
2023-07-11 19:06 Mazi Note Added: 76053
2023-07-12 08:11 DenisChenu Note Added: 76055
2023-07-12 10:27 ollehar Note Added: 76057
2023-07-12 19:54 p_teichmann Note Added: 76066
2023-07-12 19:54 p_teichmann Bug heat 14 => 16
2023-07-12 20:34 Mazi Note Added: 76067
2023-07-13 07:38 DenisChenu Note Added: 76070
2023-07-13 12:00 p_teichmann Note Added: 76073
2023-07-13 12:08 p_teichmann Note Edited: 76073
2023-07-13 13:24 Mazi Note Added: 76076
2023-08-24 21:51 Mazi Note Added: 76703
2023-08-25 00:51 guest Bug heat 16 => 22
2023-08-25 10:37 ollehar Note Added: 76707
2023-08-25 10:42 Mazi Note Added: 76709
2023-08-25 10:51 ollehar Note Added: 76710
2023-09-07 22:19 Mazi Note Added: 76911
2023-09-08 21:20 gabrieljenik Assigned To => gabrieljenik
2023-09-08 21:20 gabrieljenik Status new => assigned
2023-09-08 21:30 gabrieljenik Note Added: 76932
2023-09-08 21:30 gabrieljenik Bug heat 22 => 24
2023-09-11 16:17 gabrieljenik Assigned To gabrieljenik => ollehar
2023-09-11 16:17 gabrieljenik Status assigned => ready for code review
2023-09-11 16:17 gabrieljenik Note Added: 76938
2023-09-11 16:18 gabrieljenik Assigned To ollehar => p_teichmann
2023-09-11 16:39 gabrieljenik Note Added: 76940
2023-09-11 16:43 DenisChenu Note Added: 76941
2023-09-11 17:59 gabrieljenik Note Added: 76944
2023-09-14 14:46 gabrieljenik Issue cloned: 19085
2023-09-14 14:46 gabrieljenik Relationship added related to 19085
2023-09-14 14:49 gabrieljenik Issue cloned: 19086
2023-09-14 14:49 gabrieljenik Relationship added related to 19086
2023-09-14 14:51 gabrieljenik Note Added: 77037
2023-09-14 16:31 gabrieljenik Note Added: 77049
2023-09-14 16:31 gabrieljenik File Added: test_18880.zip
2023-09-14 16:32 gabrieljenik Note Edited: 77049
2023-09-14 16:33 gabrieljenik Note Edited: 77049