Vendor condition viewhelper not compatible with TYPO3 7.6
albig opened this issue · 0 comments
albig commented
The viewhelpers IsConsentField and IsElementAllowed are not compatible with TYPO3 7.6. The followin PHP warning is thrown:
#1: PHP Warning: Declaration of EWW\Dpf\ViewHelpers\IsElementAllowedViewHelper::render($condition) should be compatible with TYPO3\CMS\Fluid\Core\ViewHelper\AbstractConditionViewHelper::render() in /app/web/typo3conf/ext/dpf/Classes/ViewHelpers/IsElementAllowedViewHelper.php line 17
As the way TYPO3 7.6 declares condition viewhelper ist not compatible with older TYPO3 versions, we cannot change the viewhelpers itself.
Proposal:
- remove both viewHelpers as both are special replacements of f:if-viewhelper, checking the backend context additionally
- write a simple ViewHelper "typo3Mode" which returns the TYPO3_MODE constant ('FE' or 'BE') to fluid
- use the standard fluid f:if-Viewhelper with a suitable condition ANDed with TYPO3_MODE