Project

General

Profile

Actions

Bug #88402

closed

Systeminformation toolbar - renders png/svg icons not correctly

Added by Christian Hackl almost 5 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Backend API
Target version:
-
Start date:
2019-05-20
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
9
PHP Version:
7.2
Tags:
systeminformation, toolbar,CodingNight
Complexity:
Is Regression:
Sprint Focus:

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'
  );
}

Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #84773: Systeminformation toolbar should render svgs inlineClosed2018-04-17

Actions
Related to TYPO3 Core - Bug #90633: png Icons for BackendModulesClosed2020-03-04

Actions
Actions #1

Updated by Georg Ringer almost 5 years ago

  • Related to Bug #84773: Systeminformation toolbar should render svgs inline added
Actions #2

Updated by Susanne Moog over 4 years ago

  • Tags changed from systeminformation, toolbar to systeminformation, toolbar,CodingNight
Actions #3

Updated by Gerrit Code Review over 4 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

Actions #5

Updated by Gerrit Code Review over 4 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

Actions #6

Updated by Pascal Rinker over 4 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#Attributes

https://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.

Actions #7

Updated by Christian Hackl over 4 years ago

This is currently no problem - only not valid code... so maybe this can be ignored? :)

Actions #8

Updated by Pascal Rinker over 4 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.

Actions #9

Updated by Christian Eßl over 4 years ago

  • Category set to Backend API
Actions #10

Updated by Christian Eßl about 4 years ago

  • Related to Bug #90633: png Icons for BackendModules added
Actions #11

Updated by Benjamin Franzke almost 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.

Actions #12

Updated by Benni Mack almost 4 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF