View Issue Details

This bug affects 4 person(s).
 34
IDProjectCategoryView StatusLast Update
18880Bug reportsTheme editorpublic2024-01-08 11:13
ReporterDenisChenu Assigned Togabrieljenik  
PrioritynoneSeveritypartial_block 
Status resolvedResolutionfixed 
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 heat34
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 resolvedtibor.pacalat Not able to add theme option text input 
related to 18893 closed file list do not show in dropdowns 
related to 18895 resolvedtibor.pacalat No way to add textarea with core config.xml 
related to 19085 closedmfavetti Theme Options with an on/off switch are not disabled when page loads 
related to 19086 closedmfavetti Survey Theme Options: image preview does not work 
related to 19183 closedmfavetti No editing possible after setting the survey background 

Users monitoring this issue

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)
tibor.pacalat

tibor.pacalat

2023-10-05 16:56

administrator   ~77526

@gabrieljenik this issue was originally reported for 5.x, don't we want to port the fix there as well?

gabrieljenik

gabrieljenik

2023-10-05 17:08

manager   ~77529

Usually no developments are done to LTS

Mazi

Mazi

2023-10-11 14:43

updater   ~77625

@tibor.pacalat / @gabrieljenik: Will this fix finalle be part of the next 6.x release?

Mazi

Mazi

2023-11-13 09:58

updater   ~78402

@gabrieljenik, this is actually a bug fix I'd say, not a new feature.

@tibor.pacalat: This issue was reported 5 months ago. Can we finally have this available at the next release? We really need this for template development for our customers.

@c_schmitz: Will all Limesurvey 3 customers be force-updated to LS 6 in November?

gabrieljenik

gabrieljenik

2023-11-13 14:02

manager   ~78409

@gabrieljenik, this is actually a bug fix I'd say, not a new feature.

Sorry. I understand what you say.
I was speaking from a more technical point of view.

On this one I would need a green light from Carsten, Olle o Tibor to backport it.

tibor.pacalat

tibor.pacalat

2023-11-14 11:38

administrator   ~78449

@gabrieljenik if you can make a PR for master fairly easily, we can include this in the next release.

gabrieljenik

gabrieljenik

2023-11-14 19:58

manager   ~78479

I will

gabrieljenik

gabrieljenik

2023-11-16 14:21

manager   ~78503

Master: https://github.com/LimeSurvey/LimeSurvey/pull/3621

DenisChenu

DenisChenu

2023-11-17 15:24

developer   ~78513

Potential optimization, no ?

ollehar

ollehar

2023-11-28 09:30

administrator   ~78760

@tibor.pacalat Time to test? Code review is done.

tibor.pacalat

tibor.pacalat

2023-11-28 16:05

administrator   ~78773

Last edited: 2023-11-28 16:18

@gabrieljenik I am getting an error when I upload the test_18880.zip. I am using php 8.1 and debug=2. But, otherwise this works.

gabrieljenik

gabrieljenik

2023-11-28 16:41

manager   ~78782

Will review

gabrieljenik

gabrieljenik

2023-11-28 20:34

manager   ~78797

Try now again please

guest

guest

2023-11-29 16:13

viewer   ~78807

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

guest

guest

2023-11-29 16:13

viewer   ~78808

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

tibor.pacalat

tibor.pacalat

2023-11-29 16:13

administrator   ~78809

Tested and merged.

tibor.pacalat

tibor.pacalat

2023-12-13 16:57

administrator   ~78972

Hi @Mazi, as stated here https://bugs.limesurvey.org/view.php?id=18880#c77049 the type should be imagefile and not dropdown. With this setting, it works for me. Please let me know if this has solved your issue or there is something else to do here.

@gabrieljenik can you also double check if there is something still buggy regarding this feature?

gabrieljenik

gabrieljenik

2023-12-14 18:14

manager   ~78994

@gabrieljenik can you also double check if there is something still buggy regarding this feature?

I confirm what you say about "imagefile".
I don't see anything from my side.

guest

guest

2023-12-18 12:49

viewer   ~79027

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

Mazi

Mazi

2024-01-08 11:04

updater   ~79100

Happy New Year everyone!
What is the current status of this ticket? I think when using "imagefile", everything should work as expected at LS 6.x?

tibor.pacalat

tibor.pacalat

2024-01-08 11:13

administrator   ~79101

@Mazi everything should work as expected on LS6 when using "imagefile".

Related Changesets

LimeSurvey: master 251e4609

2023-10-05 16:54:53

Gabriel Jenik


Committer: GitHub Details Diff
New feature 18880: New imagefile option type for theme options (#3433)

Co-authored-by: lapiudevgit <devgit@lapiu.biz>
Affected Issues
18880
mod - application/models/TemplateConfiguration.php Diff File
mod - application/views/themeOptions/options_core.php Diff File

LimeSurvey: master 37c0dea2

2023-11-29 16:13:11

Gabriel Jenik


Committer: GitHub Details Diff
New feature 18880: New imagefile option type for theme options (#3621)

Co-authored-by: lapiudevgit <devgit@lapiu.biz>
Affected Issues
18880
mod - application/controllers/admin/Themes.php Diff File
mod - application/models/TemplateConfiguration.php Diff File
mod - application/views/themeOptions/options_core.php Diff File

LimeSurvey: master 37c0dea2

2023-11-29 16:13:11

Gabriel Jenik


Committer: GitHub Details Diff
New feature 18880: New imagefile option type for theme options (#3621)

Co-authored-by: lapiudevgit <devgit@lapiu.biz>
Affected Issues
18880
mod - application/controllers/admin/Themes.php Diff File
mod - application/models/TemplateConfiguration.php Diff File
mod - application/views/themeOptions/options_core.php Diff File

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
2023-10-05 13:16 p_teichmann Status ready for code review => in code review
2023-10-05 15:06 p_teichmann Status in code review => ready for testing
2023-10-05 15:07 p_teichmann Assigned To p_teichmann => tibor.pacalat
2023-10-05 16:56 tibor.pacalat Note Added: 77526
2023-10-05 16:56 tibor.pacalat Bug heat 24 => 26
2023-10-05 17:08 gabrieljenik Note Added: 77529
2023-10-05 17:51 tibor.pacalat Status ready for testing => resolved
2023-10-05 17:51 tibor.pacalat Resolution open => fixed
2023-10-11 14:43 Mazi Note Added: 77625
2023-10-20 22:23 mfavetti Relationship added related to 19183
2023-11-13 09:58 Mazi Note Added: 78402
2023-11-13 14:02 gabrieljenik Note Added: 78409
2023-11-14 11:38 tibor.pacalat Note Added: 78449
2023-11-14 19:58 gabrieljenik Note Added: 78479
2023-11-16 14:21 gabrieljenik Assigned To tibor.pacalat => DenisChenu
2023-11-16 14:21 gabrieljenik Status resolved => ready for code review
2023-11-16 14:21 gabrieljenik Note Added: 78503
2023-11-17 15:24 DenisChenu Assigned To DenisChenu => gabrieljenik
2023-11-17 15:24 DenisChenu Status ready for code review => in code review
2023-11-17 15:24 DenisChenu Note Added: 78513
2023-11-28 09:30 ollehar Note Added: 78760
2023-11-28 16:05 tibor.pacalat Note Added: 78773
2023-11-28 16:05 tibor.pacalat File Added: Screenshot 2023-11-28 at 15.59.42.png
2023-11-28 16:05 tibor.pacalat Assigned To gabrieljenik => tibor.pacalat
2023-11-28 16:18 tibor.pacalat Note Edited: 78773
2023-11-28 16:41 gabrieljenik Note Added: 78782
2023-11-28 20:34 gabrieljenik Note Added: 78797
2023-11-29 16:13 Changeset attached => LimeSurvey master 37c0dea2
2023-11-29 16:13 guest Note Added: 78807
2023-11-29 16:13 guest Bug heat 26 => 28
2023-11-29 16:13 Changeset attached => LimeSurvey master 37c0dea2
2023-11-29 16:13 guest Note Added: 78808
2023-11-29 16:13 tibor.pacalat Status in code review => resolved
2023-11-29 16:13 tibor.pacalat Note Added: 78809
2023-12-13 10:51 tibor.pacalat Assigned To tibor.pacalat => gabrieljenik
2023-12-13 10:51 tibor.pacalat Status resolved => new
2023-12-13 10:51 tibor.pacalat Resolution fixed => reopened
2023-12-13 10:52 DenisChenu View Status public => private
2023-12-13 10:52 DenisChenu Bug heat 28 => 34
2023-12-13 10:52 DenisChenu View Status private => public
2023-12-13 10:52 DenisChenu Bug heat 34 => 28
2023-12-13 16:57 tibor.pacalat Note Added: 78972
2023-12-14 18:14 gabrieljenik Note Added: 78994
2023-12-18 12:49 Changeset attached => LimeSurvey master 251e4609
2023-12-18 12:49 guest Note Added: 79027
2024-01-08 11:04 Mazi Note Added: 79100
2024-01-08 11:10 tibor.pacalat Status new => resolved
2024-01-08 11:10 tibor.pacalat Resolution reopened => fixed
2024-01-08 11:13 tibor.pacalat Note Added: 79101
2024-01-16 10:11 guest Bug heat 28 => 34