Project

General

Profile

Actions

Bug #86743

closed

Inline "then"/"else" not working for IfHasRoleViewHelper

Added by Mathias Brodala over 5 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Must have
Category:
Fluid
Target version:
Start date:
2018-10-25
Due date:
% Done:

100%

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

Description

Since TYPO3v8 using the inline then and else arguments on the IfHasRoleViewHelper does not work anymore.

Thus {f:security.ifHasRole(role: 10, then: 'YES', else: 'NO')} leads to an error:

Undeclared arguments passed to ViewHelper TYPO3\CMS\Fluid\ViewHelpers\Security\IfHasRoleViewHelper: then, else. Valid arguments are: role

This happens because IfHasRoleViewHelper::initializeArguments() does not call the same method of TYPO3Fluid\Fluid\Core\ViewHelper\AbstractConditionViewHelper.

In TYPO3v7 this was avoided because TYPO3\CMS\Fluid\Core\ViewHelper\AbstractConditionViewHelper did register these arguments in its constructor. Thus this is a regression.

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

Actions #2

Updated by Gerrit Code Review over 5 years ago

Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58702

Actions #3

Updated by Mathias Brodala over 5 years ago

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

Updated by Vasyl Mosiychuk over 5 years ago

  • Related to Bug #86841: Inline "then"/"else" not working for <f:security.ifAuthenticated> added
Actions #5

Updated by Mathias Brodala over 5 years ago

  • Related to deleted (Bug #86841: Inline "then"/"else" not working for <f:security.ifAuthenticated>)
Actions #6

Updated by Benni Mack almost 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF