View Issue Details

This bug affects 1 person(s).
 10
IDProjectCategoryView StatusLast Update
16480Bug reportsTheme editorpublic2022-01-05 09:38
Reportercdorin Assigned Togabrieljenik  
PriorityhighSeveritypartial_block 
Status closedResolutionfixed 
Product Version3.22.25 
Summary16480: Empty logo causes under specific circumstances loops on the welcome page
Description

On every new installation, logo appears as "enabled" in global survey themes, but no file is preselected (see screenshot).

Simplest solution: logo.png should always be selected inside global survey themes.

That should apply to:

  • all three default themes: vanilla, bootswatch, and vanilla
  • all extended themes (if I extend a theme, e.g., fruity, the logo field is enabled, but no file preselected)
Additional Information

This issue happens under very specific circumstances - didn't spend more time on it but when I had the chance to look through other installations, I was always seeing that the looping was getting caused by the lack of logo/brandlogo/background file when they are enabled.

TagsNo tags attached.
Attached Files
logo_issue.png (73,600 bytes)   
logo_issue.png (73,600 bytes)   
Bug heat10
Complete LimeSurvey version number (& build)irrelevant
I will donate to the project if issue is resolvedNo
Browser
Database type & versionirrelevant
Server OS (if known)
Webserver software & version (if known)
PHP Versionirrelevant

Users monitoring this issue

DenisChenu

Activities

gabrieljenik

gabrieljenik

2020-07-10 16:11

manager   ~58897

Looping means that participant culdn't advance from the welcome page to the 1st question

gabrieljenik

gabrieljenik

2020-07-27 17:48

manager   ~59105

Last edited: 2020-07-27 17:51

I wasn't able to reproduce the looping situation.

I understand the issue of having the dropdown with no value, although on the DB there is a value.
To fix this, the value saved on DB while installing should be "themes/survey/fruity/files/logo.png".
Also an update script should be done for replacing "./files/logo.png" with the correct value ofr current installations.
Still, I think that's minor and not the objective of this ticket.

Let's review again.

Thanks

c_schmitz

c_schmitz

2021-03-30 15:34

administrator   ~63722

Last edited: 2021-03-30 15:38

I think the biggest problem here is that the file is saved with a path, which makes no sense because paths can change, also the usage of the logo is not the file path but a URL.

The theme could be renamed, or the path could change in general if the whole upload folder is moved.

The beginning of both paths need to be interpreted as placeholders ( either starting with \themes\survey or \upload\themes\survey\ ) and both would need to be relative URLs (relative to the LimeSurvey root URL)

THis will be a constant nuisance unless fixed properly.

Current default for a core theme is
./files/logo.png

but for extended themes a full path is saved, which is unnecessary and also probably unsafe.

c_schmitz

c_schmitz

2021-03-30 15:40

administrator   ~63723

Last edited: 2021-03-30 15:40

How about the file is always saved relative the way the default is?
If the theme is extended just use the theme folder.
Most problematic part is the update of existing paths to the correct scheme.

DenisChenu

DenisChenu

2021-03-30 17:41

developer   ~63724

Last edited: 2021-03-30 17:42

This happen between 2 minor release :

User add svg in allowed file upload
User use svg as logo via css.

in a twig file
<style>
.logo-banner{
background-image: url ( {{ imageSrc("./files.mylogo.svg") }});
}
</style>
Update to last version :
https://github.com/LimeSurvey/LimeSurvey/commit/756c1687ab30cebe8849aa9ca9ffda79cd6ed647
Same style give
<style>
.logo-banner{
background-image: url ( );
}
</style>

A call to https://survey.example.org/index.php?r=survey/index&amp;sid=217451&amp;newtest=Y or https://survey.example.org/index.php?r=survey/index&amp;sid=217451
Expression manager start again.

click on next : no effect : coma back to welcome page.

DenisChenu

DenisChenu

2021-03-30 17:43

developer   ~63725

How about the file is always saved relative the way the default is?

The file is not saved with relative path ?

It's OK using image but not imageSrc currentmly.

The issue is <img src=""> make a call to current url …

c_schmitz

c_schmitz

2021-03-31 15:46

administrator   ~63755

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

c_schmitz

c_schmitz

2021-03-31 15:47

administrator   ~63756

Fix committed to 3.x-LTS branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&amp;id=31433

gabrieljenik

gabrieljenik

2021-07-05 17:41

manager   ~65206

Extra enhancement for avoiding path traversing...
For Your Reviewal
https://github.com/LimeSurvey/LimeSurvey/pull/1927

gabrieljenik

gabrieljenik

2021-10-26 16:47

manager   ~66937

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

LimeBot

LimeBot

2022-01-05 09:38

administrator   ~67928

Fixed in Release 5.1.18+211101

Related Changesets

LimeSurvey: master ebcbc490

2021-03-31 15:45:55

c_schmitz

Details Diff
Fixed issue 16480: Empty/invalid brand/background logo causes loops on the welcome page
Dev This fixes only the output part. A proper way for saving the path/Url still needs to be fixed.
Affected Issues
16480
mod - themes/survey/fruity/views/subviews/header/custom_header.twig Diff File

LimeSurvey: 3.x-LTS dfabc2c3

2021-03-31 15:45:55

c_schmitz

Details Diff
Fixed issue 16480: Empty/invalid brand/background logo causes loops on the welcome page
Dev This fixes only the output part. A proper way for saving the path/Url still needs to be fixed.
Affected Issues
16480
mod - themes/survey/fruity/views/subviews/header/custom_header.twig Diff File

LimeSurvey: master 3f414911

2021-10-26 16:47:48

gabrieljenik


Committer: GitHub Details Diff
Fixed issue 16480: Empty logo causes under specific circumstances loops on the welcome page (#2058) Affected Issues
16480
mod - application/config/version.php Diff File
mod - application/controllers/admin/themes.php Diff File
mod - application/core/LS_Twig_Extension.php Diff File
add - application/datavalueobjects/ThemeFileCategory.php Diff File
add - application/datavalueobjects/ThemeFileInfo.php Diff File
add - application/helpers/SurveyThemeHelper.php Diff File
mod - application/helpers/update/updatedb_helper.php Diff File
mod - application/models/Template.php Diff File
mod - application/models/TemplateConfig.php Diff File
mod - application/models/TemplateConfiguration.php Diff File
mod - application/models/TemplateManifest.php Diff File
add - tests/models/TemplateConfigurationTest.php Diff File

Issue History

Date Modified Username Field Change
2020-07-09 15:39 cdorin New Issue
2020-07-09 15:39 cdorin File Added: logo_issue.png
2020-07-09 15:40 cdorin Priority none => high
2020-07-09 15:40 cdorin Severity minor => partial_block
2020-07-09 15:40 cdorin Description Updated
2020-07-09 15:40 cdorin Zoho Sprints => |Yes|
2020-07-09 15:40 swendrich Zoho Sprints ID => 14469000000167061
2020-07-09 15:40 cdorin Status new => confirmed
2020-07-09 15:40 cdorin Zoho Sprints Yes => |Yes|
2020-07-10 16:11 gabrieljenik Note Added: 58897
2020-07-27 17:48 gabrieljenik Note Added: 59105
2020-07-27 17:51 gabrieljenik Note Edited: 59105
2021-03-30 15:34 c_schmitz Note Added: 63722
2021-03-30 15:38 c_schmitz Note Edited: 63722
2021-03-30 15:40 c_schmitz Note Added: 63723
2021-03-30 15:40 c_schmitz Note Edited: 63723
2021-03-30 17:41 DenisChenu Note Added: 63724
2021-03-30 17:42 DenisChenu Note Edited: 63724
2021-03-30 17:42 DenisChenu Issue Monitored: DenisChenu
2021-03-30 17:43 DenisChenu Note Added: 63725
2021-03-31 15:46 c_schmitz Changeset attached => LimeSurvey master ebcbc490
2021-03-31 15:46 c_schmitz Note Added: 63755
2021-03-31 15:46 c_schmitz Assigned To => c_schmitz
2021-03-31 15:46 c_schmitz Resolution open => fixed
2021-03-31 15:47 c_schmitz Changeset attached => LimeSurvey 3.x-LTS dfabc2c3
2021-03-31 15:47 c_schmitz Note Added: 63756
2021-07-05 17:41 gabrieljenik Status confirmed => ready for testing
2021-07-05 17:41 gabrieljenik Note Added: 65206
2021-07-22 12:55 galads Assigned To c_schmitz => galads
2021-07-22 12:55 galads Status ready for testing => confirmed
2021-09-02 15:33 c_schmitz Assigned To galads => gabrieljenik
2021-10-26 16:47 gabrieljenik Changeset attached => LimeSurvey master 3f414911
2021-10-26 16:47 gabrieljenik Note Added: 66937
2022-01-05 09:38 LimeBot Note Added: 67928
2022-01-05 09:38 LimeBot Status confirmed => closed
2022-01-05 09:38 LimeBot Bug heat 8 => 10