View Issue Details

This bug affects 1 person(s).
 8
IDProjectCategoryView StatusLast Update
18893Bug reportsTheme editorpublic2023-06-16 15:14
ReporterOMdev Assigned To 
PrioritynoneSeverityblock 
Status closedResolutionduplicate 
Product Version6.1.x 
Summary18893: file list do not show in dropdowns
Description

Greetings. The select dropdowns on the theme options page display the image/logo list in a satisfactory manner exclusively for [Logo] and [Background image]. However, if we attempt to incorporate other logos, such as logo middle or logo left, everything functions correctly except for the image/logo list failing to appear in its respective dropdown. Consequently, we are unable to modify the file selection through the theme options.

Steps To Reproduce

Steps to reproduce

Add below lines to config.xml
<brandlogoLeft type="buttons" category="Images" width="4" title="logoLeft" options="on|off" optionlabels="Yes|No">on</brandlogoLeft>
<brandlogoLeftfile type="dropdown" category="Images" width="6" title="logoLeft file" parent="brandlogoLeft">./files/logo.png</brandlogoLeftfile>

Expected result

brandlogoLeft theme options and image/logo list in dropdowns

Actual result

brandlogoLeft theme options show up but not the dropdown

TagsNo tags attached.
Bug heat8
Complete LimeSurvey version number (& build)LimeSurvey Community Edition Version 6.1.3+230612
I will donate to the project if issue is resolvedNo
Browser
Database type & versionNA
Server OS (if known)
Webserver software & version (if known)
PHP VersionNA

Relationships

related to 18880 closedgabrieljenik Unable to add imagefile except brandlogofile and backgroundimagefile in option 

Users monitoring this issue

There are no users monitoring this issue.

Activities

Mazi

Mazi

2023-06-16 14:34

updater   ~75675

@DenisChenu, @tpartner, did you ever create custom themes for 5.x or 6.x using the theme option setup directly at config.xml?

We are facing this issue and wonder if we are doing something wrong at the implementation or if this is a bug at Limesurvey which prevents users from defining their own additional logos.

tpartner

tpartner

2023-06-16 14:44

partner   ~75676

@Mazi, no, I have not tried to add an option dropdown.

OMdev

OMdev

2023-06-16 14:59

reporter   ~75677

I see code blocks that I feel responsible for [background file] and [brand logo file] in the beging of file [views/themeOptions/options_core.php]. If I append below code to this file then issues gets resolved. But we can not edit LS core files make cutomizing templates. I am sharing this obsevation so that it may help in tracing the issue.

//------------------------------- brand logoLeft file
$brandlogoLeft = '';
$logoLeftfileOptionsInherit = '';
$logoLeftfileInheritPreview = '';
$logoLeftfileInheritFilename = '';
$optgroup = '';
foreach ($aTemplateConfiguration['imageFileList'] as $image) {
if ($image['group'] != $optgroup) {
if ($optgroup != '') {
$brandlogoLeft .= '</optgroup>';
}
$brandlogoLeft .= '<optgroup label="' . $image['group'] . '">';
$optgroup = $image['group'];
}

$brandlogoLeft .= '&lt;/optgroup>';
if ($oParentOptions['brandlogoLeft'] == $image['filepath']) {
    $logoLeftfileInheritPreview  = $logoLeftfileInheritPreview . $image['preview'];
    $logoLeftfileInheritFilename = $logoLeftfileInheritFilename . $image['filename'];
}
$brandlogoLeft .= '&lt;option data-lightbox-src=&quot;' . $image['preview'] . '&quot; value=&quot;' . $image['filepath'] . '&quot;>' . $image['filename'] . '&lt;/option>';

}

$aOptionAttributes['optionAttributes']['brandlogoLeftfile']['dropdownoptions'] = $brandlogoLeft;

DenisChenu

DenisChenu

2023-06-16 15:07

developer   ~75679

We are facing this issue and wonder if we are doing something wrong at the implementation or if this is a bug at Limesurvey which prevents users from defining their own additional logos.

Issue or misfeature in LimeSurvey : https://bugs.limesurvey.org/view.php?id=18880

The 2 image list are fixed by code there are no way to set another dropdown to imageList

Remind : we need an attribute or something other to tell this dropdown are a imageList

Mazi

Mazi

2023-06-16 15:14

updater   ~75680

Well, when using our own options.twig file we can easily have multiple logos. When using the config.xml, this does not work. So I consider this a regression.

Issue History

Date Modified Username Field Change
2023-06-16 12:54 OMdev New Issue
2023-06-16 14:34 Mazi Note Added: 75675
2023-06-16 14:34 Mazi Bug heat 0 => 2
2023-06-16 14:44 tpartner Note Added: 75676
2023-06-16 14:44 tpartner Bug heat 2 => 4
2023-06-16 14:59 OMdev Note Added: 75677
2023-06-16 14:59 OMdev Bug heat 4 => 6
2023-06-16 15:07 DenisChenu Note Added: 75679
2023-06-16 15:07 DenisChenu Bug heat 6 => 8
2023-06-16 15:08 DenisChenu Relationship added related to 18880
2023-06-16 15:08 DenisChenu Status new => closed
2023-06-16 15:08 DenisChenu Resolution open => duplicate
2023-06-16 15:14 Mazi Note Added: 75680