Project

General

Profile

Actions

Bug #104432

closed

core:icon viewhelper - examples in doc header are wrong

Added by Philipp Kuhlmay 4 months ago. Updated 4 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Code Cleanup
Target version:
Start date:
2024-07-19
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
13
PHP Version:
8.2
Tags:
Complexity:
easy
Is Regression:
Sprint Focus:

Description

In EXT:sysext/core/Classes/ViewHelpers/IconViewHelper.php according to the doc header examples the following code:

<core:icon title="Open actions menu" identifier="actions-menu" />

should output the following:
<span title="Open actions menu" class="t3js-icon icon icon-size-small icon-state-default icon-actions-menu" data-identifier="actions-menu" aria-hidden="true">
    <span class="icon-markup">
        <img src="/typo3/sysext/core/Resources/Public/Icons/T3Icons/actions/actions-menu.svg" width="16" height="16">
    </span>
</span>

but in fact it outputs this:

<span title="Open actions menu" class="t3js-icon icon icon-size-small icon-state-default icon-actions-menu" data-identifier="actions-menu" aria-hidden="true">
  <span class="icon-markup">
    <svg class="icon-color"><use xlink:href="/typo3/sysext/core/Resources/Public/Icons/T3Icons/sprites/actions.svg#actions-menu"></use></svg>
  </span>    
</span>

So it outputs an svg instead of the img-tag. Either the example or the output code is wrong.

I use the main branch with TYPO3 13 and the latest commits. Nothing special.

Actions #1

Updated by Andreas Kienast 4 months ago

  • Status changed from New to Closed

Both is correct. The concrete output depends on which icon provider is used for the requested icon. Since there is no general truth for all cases, I'll close the ticket.

Actions #2

Updated by Philipp Kuhlmay 4 months ago

  • Description updated (diff)
Actions

Also available in: Atom PDF