Bug #88402
closedSysteminformation toolbar - renders png/svg icons not correctly
0%
Description
Extending the system information toolbar with a png-icon, renders following:
'<img width="16" height="16" xlink:href="/typo3conf/ext/myExt/Resources/Public/Images/BackendIcons/myIcon.png">'
- 'src'-attribute is missing.
- xlink:href have the correct path.
- xlink:href is depricated - https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/xlink:href
TYPO3 9.5.7
// ext_localconf.php ... $iconRegistry->registerIcon( 'test-icon', \TYPO3\CMS\Core\Imaging\IconProvider\BitmapIconProvider::class, ['source' => "EXT:{$extensionKey}/Resources/Public/Images/BackendIcons/myIcon.png"] );
// ToolbarItem.php ... public function addVersionInformation(SystemInformationToolbarItem $systemInformation) { //... $systemInformation->addSystemInformation( 'My Title', htmlspecialchars($value, ENT_QUOTES | ENT_HTML5), 'test-icon' ); }
Updated by Georg Ringer over 5 years ago
- Related to Bug #84773: Systeminformation toolbar should render svgs inline added
Updated by Susanne Moog over 5 years ago
- Tags changed from systeminformation, toolbar to systeminformation, toolbar,CodingNight
Updated by Gerrit Code Review over 5 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61421
Updated by Christian Hackl over 5 years ago
This patch seems to work: https://review.typo3.org/c/Packages/TYPO3.CMS/+/61421
But for the sake of completeness: add alt-attribute
( sry both german:
https://developer.mozilla.org/de/docs/Web/HTML/Element/img#Attributes
https://wiki.selfhtml.org/wiki/HTML/Multimedia_und_Grafiken/Grafiken#Pflichtangaben
)
Updated by Gerrit Code Review over 5 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61421
Updated by Pascal Rinker over 5 years ago
Christian Hackl wrote:
This patch seems to work: https://review.typo3.org/c/Packages/TYPO3.CMS/+/61421
But for the sake of completeness: add alt-attribute( sry both german:
https://developer.mozilla.org/de/docs/Web/HTML/Element/img#Attributeshttps://wiki.selfhtml.org/wiki/HTML/Multimedia_und_Grafiken/Grafiken#Pflichtangaben
)
I think we can´t add a alt attribute because we have no possibility to pass that value from IconFactory::getIcon() to the IconProvider.
Updated by Christian Hackl over 5 years ago
This is currently no problem - only not valid code... so maybe this can be ignored? :)
Updated by Pascal Rinker over 5 years ago
Christian Hackl wrote:
This is currently no problem - only not valid code... so maybe this can be ignored? :)
Yes I think we could merge it the way it is now, because in the rest of the backend no alt-attributes are used either.
Updated by Christian Eßl almost 5 years ago
- Related to Bug #90633: png Icons for BackendModules added
Updated by Benjamin Franzke over 4 years ago
- Status changed from Under Review to Resolved
The backend generated an <image> tag (where xlink:href is fine) but the <svg> context was missing – that caused your browser to transform <image> to an <img> tag where xlink:href becomes invalid.
This is fixed in https://review.typo3.org/c/Packages/TYPO3.CMS/+/64325 (both in v10 and v9).
If tested your example with that patch and png icons in the systeminformation toolbar do work again.