Bug #86743
Inline "then"/"else" not working for IfHasRoleViewHelper
100%
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.
Associated revisions
[BUGFIX] Register "then"/"else" in IfHasRoleViewHelper again
This fixes the usage of "then" and "else" for the inline notation.
Resolves: #86743
Releases: master, 8.7
Change-Id: Ia0a749fedcb3b3d4ffe7f90ac40ab604fd7c340a
Reviewed-on: https://review.typo3.org/58692
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Daniel Goerz <daniel.goerz@posteo.de>
Tested-by: Daniel Goerz <daniel.goerz@posteo.de>
Reviewed-by: Joerg Kummer <typo3@enobe.de>
Tested-by: Joerg Kummer <typo3@enobe.de>
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Tested-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
[BUGFIX] Register "then"/"else" in IfHasRoleViewHelper again
This fixes the usage of "then" and "else" for the inline notation.
Resolves: #86743
Releases: master, 8.7
Change-Id: Ia0a749fedcb3b3d4ffe7f90ac40ab604fd7c340a
Reviewed-on: https://review.typo3.org/58702
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Joerg Kummer <typo3@enobe.de>
Tested-by: Joerg Kummer <typo3@enobe.de>
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Tested-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
History
#1
Updated by Gerrit Code Review about 1 year 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
#2
Updated by Gerrit Code Review about 1 year 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
#3
Updated by Mathias Brodala about 1 year ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 28f0f0b234994d83f40b5b6d882821eb4b5437d6.
#4
Updated by Vasyl Mosiychuk about 1 year ago
- Related to Bug #86841: Inline "then"/"else" not working for <f:security.ifAuthenticated> added
#5
Updated by Mathias Brodala about 1 year ago
- Related to deleted (Bug #86841: Inline "then"/"else" not working for <f:security.ifAuthenticated>)
#6
Updated by Benni Mack 7 months ago
- Status changed from Resolved to Closed