Bug #73197

f:switch does not work. Wrong namespace

Added by Stefan Froemken over 5 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Fluid
Target version:
Start date:
2016-02-09
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
8
PHP Version:
5.6
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

Hello,

I have following Fluid-Partial, but it only renders the defaultCase:

{namespace core = TYPO3\CMS\Core\ViewHelpers}

<f:switch expression="{severity}">
    <f:case value="0"><core:icon identifier="status-dialog-information" /></f:case>
    <f:case value="1"><core:icon identifier="status-dialog-notification" /></f:case>
    <f:case value="2"><core:icon identifier="status-dialog-warning" /></f:case>
    <f:case value="3"><core:icon identifier="status-dialog-error" /></f:case>
    <f:case value="-1"><core:icon identifier="status-dialog-ok" /></f:case>
    <f:defaultCase>nothing</f:defaultCase>
</f:switch>

Following Method checks against \TYPO3Fluid\Fluid\ViewHelpers\CaseViewHelper, but Node is of Type \TYPO3\CMS\Fluid\ViewHelpers\CaseViewHelper

protected function isCaseNode(NodeInterface $node) {
    return ($node instanceof ViewHelperNode && $node->getViewHelperClassName() === CaseViewHelper::class);
}

Stefan


Related issues

Related to TYPO3 Core - Feature #69863: Use new standalone Fluid as composer dependencyClosedClaus Due2015-09-16

Actions
#1

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/46546

#2

Updated by Gerrit Code Review over 5 years ago

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/46548

#3

Updated by Frank Naegler about 5 years ago

  • Target version changed from 8 LTS to 8.0
#4

Updated by Gerrit Code Review about 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/46548

#5

Updated by Gerrit Code Review about 5 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/46548

#6

Updated by Gerrit Code Review about 5 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/46548

#7

Updated by Anonymous about 5 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
#8

Updated by Riccardo De Contardi over 3 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF