benjaminkott / benjaminkott/bootstrap_package
IconViewHelper does not properly handle SVG FileReference objects, outputs raw SVG code instead of rendering image
- Dominant language
- PHP
- Stars
- 355
- Forks
- 212
- Avg merge
- 1h 4m
- Merged PRs (30d)
- 31
Description
# Bug Report
## Prerequisites
* [ ] Can you reproduce the problem on TYPO3 v11.5 LTS
* [X] Can you reproduce the problem on TYPO3 v12.4 LTS
* [X] Did you [perform a cursory search](https://github.com/issues?q=is%3Aissue+user%3Abenjaminkott+repo%3Abenjaminkott%2Fbootstrap_package)
to see if your bug or enhancement is already reported?
## Description
When using the Text & Icon content element in the Bootstrap Package with an SVG file uploaded via the media field (allowed extensions: gif, png, svg), the frontend output displays the raw SVG XML code as text instead of rendering the SVG image correctly.
In contrast, when using PNG or GIF files in the same field, the icon renders correctly.
## Steps to Reproduce
1. Create a Text & Icon content element in TYPO3 with Bootstrap Package.
2. Upload and select an SVG file in the icon media field.
3. Render the page and observe that the SVG source code is printed visibly instead of the SVG image being rendered.
4. Upload and select a PNG or GIF file in the same field and observe the icon renders correctly.
### Expected behavior
SVG files uploaded in the media field should render properly as images in the frontend, similar to PNG or GIF files.
### Actual behavior
The frontend output displays the raw SVG XML code as text
## Versions
bootstrap_package 15.0.2
typo3 12.4.33
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the IconViewHelper path used by the Text & Icon content element and compare how SVG FileReference objects are handled with PNG and GIF files. Reproduce the issue on TYPO3 12.4.33 with bootstrap_package 15.0.2; done means an SVG selected in the media field renders as an image rather than displaying raw SVG XML.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- bootstrap, php
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100