View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 19792 | Bug reports | Theme editor | public | 2024-10-07 11:36 | 2026-10-31 22:40 |
| Reporter | OMdev | Assigned To | c_schmitz | ||
| Priority | none | Severity | tweak | ||
| Status | resolved | Resolution | fixed | ||
| Product Version | 6.5.x | ||||
| Summary | 19792: We upload the SVG file into the template, but it will not be reflected in the dropdown. | ||||
| Description | We upload the SVG file into the template , but it will not be reflected in the dropdown. | ||||
| Steps To Reproduce | Steps to reproduce
Expected result
Actual result | ||||
| Tags | No tags attached. | ||||
| Attached Files | |||||
| Bug heat | 18 | ||||
| Complete LimeSurvey version number (& build) | Version 6.5.9+240521 | ||||
| I will donate to the project if issue is resolved | No | ||||
| Browser | Chrome | ||||
| Database type & version | NA | ||||
| Server OS (if known) | |||||
| Webserver software & version (if known) | |||||
| PHP Version | NA | ||||
| Git branch / Pull Request URL | |||||
|
Due to potential security issue SVG theme upload are disable by default. https://github.com/LimeSurvey/LimeSurvey/blob/bbdb4dfa8ec79774660973280dff7abb7dbbae0f/application/config/config-defaults.php#L98 Maybe an issue for manual ? |
|
|
Move it to manual/documentation issue ? |
|
|
Or maybe : Steps :
Expected result Show n error or warning |
|
|
by using {{ image('files/img.svg') }} you get back empty string. I guess is the same issue. Also {{ imageSrc() }} is not working with SVG files. |
|
|
I whitelisted svg in config and {{ imageSrc() }} started working. I lost one day debugging this undocumented issue. When file is SVG, {{ image() }} should render as |
|
Yes still undocumented https://www.limesurvey.org/manual/index.php?search=SVG Added : https://www.limesurvey.org/manual/Optional_settings#Allowed_file_upload |
|
I contributed with a few lines. I also added notes in twig theming documentation https://www.limesurvey.org/manual/Theme_editor_-_Available_Twig_functions#Image_and_file_source |
|
|
Thank you both! Is there still something to be done for this issue, or I can close it? |
|
|
Why not move to issue with :
|
|
|
Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=41203 |
|
|
LimeSurvey: master 7c02b628 2026-10-31 22:39 Details Diff |
Fixed issue 19792: The theme file upload dialogs offered all file types, including SVG files that were then rejected Dev New getFileInputAcceptValue() builds the accept attribute of the theme options image uploads from allowedthemeimageformats and of the theme editor file upload from allowedthemeuploads + allowedthemeimageformats |
Affected Issues 19792 |
|
| mod - application/helpers/common_helper.php | Diff File | ||
| mod - application/views/admin/themes/templatesummary_view.php | Diff File | ||
| mod - application/views/themeOptions/advanced.php | Diff File | ||
| mod - application/views/themeOptions/options_core.php | Diff File | ||
| add - tests/unit/helpers/GetFileInputAcceptValueTest.php | Diff File | ||
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2024-10-07 11:36 | OMdev | New Issue | |
| 2024-10-07 11:36 | OMdev | File Added: 1.png | |
| 2024-10-07 11:51 | DenisChenu | Note Added: 81174 | |
| 2024-10-07 11:51 | DenisChenu | Bug heat | 0 => 2 |
| 2024-10-07 11:52 | DenisChenu | Assigned To | => tibor.pacalat |
| 2024-10-07 11:52 | DenisChenu | Status | new => feedback |
| 2024-10-07 11:52 | DenisChenu | Note Added: 81175 | |
| 2024-10-07 11:54 | DenisChenu | Note Added: 81176 | |
| 2024-10-07 12:02 | OMdev | Issue Monitored: OMdev | |
| 2024-10-07 12:02 | OMdev | Bug heat | 2 => 4 |
| 2025-01-14 16:16 | tassoman | Note Added: 81813 | |
| 2025-01-14 16:16 | tassoman | Bug heat | 4 => 6 |
| 2025-01-14 16:24 | tassoman | Note Added: 81814 | |
| 2025-01-14 16:28 | tassoman | Issue Monitored: tassoman | |
| 2025-01-14 16:28 | tassoman | Bug heat | 6 => 14 |
| 2025-01-14 16:46 | DenisChenu | Note Added: 81815 | |
| 2025-01-14 17:48 | tassoman | Note Added: 81816 | |
| 2025-01-14 17:50 | tibor.pacalat | Note Added: 81817 | |
| 2025-01-14 17:50 | tibor.pacalat | Bug heat | 14 => 16 |
| 2025-01-15 13:07 | DenisChenu | Note Added: 81825 | |
| 2026-10-31 22:40 | c_schmitz | Changeset attached | => LimeSurvey master 7c02b628 |
| 2026-10-31 22:40 | c_schmitz | Note Added: 87056 | |
| 2026-10-31 22:40 | c_schmitz | Assigned To | tibor.pacalat => c_schmitz |
| 2026-10-31 22:40 | c_schmitz | Status | feedback => resolved |
| 2026-10-31 22:40 | c_schmitz | Resolution | open => fixed |
| 2026-10-31 22:40 | c_schmitz | Bug heat | 16 => 18 |