Breaking: #69863 - Changes in ViewHelpers post Standalone-Fluid¶
See forge#69863
Description¶
The following ViewHelpers have changed behaviours in Fluid:
- The
f:case
ViewHelper argumentdefault
has been marked as deprecated. To indicate which case is the default, usef:defaultCase
. - Tag content of
f:render
is no longer ignored and will be output if called withoptional="1"
. - Arguments
iconOnly
andstyleAttributes
have been removed fromf:be.buttons.csh
. - Argument
alternateBackgroundColors
has been removed fromf:be.tableList
. - ViewHelpers no longer use the
escapingInterceptorEnabled
property but instead useescapeChildren
andescapeOutput
to control each behavior. - All ViewHelpers no longer initialize standard arguments ("additionalArguments" and "data") in
__construct()
, but instead do this ininitializeArguments()
. If you override this method, you need to make sure you include a call toparent::initializeArguments()
in your subclass.
The following ViewHelper classes are now only found in namespace TYPO3Fluid\Fluid\ViewHelpers
and no longer exist in TYPO3\CMS\Fluid\ViewHelpers
:
TYPO3\CMS\Fluid\ViewHelpers\AliasViewHelper
TYPO3\CMS\Fluid\ViewHelpers\SwitchViewHelper
TYPO3\CMS\Fluid\ViewHelpers\CaseViewHelper
(present as deprecated alias until final removal)TYPO3\CMS\Fluid\ViewHelpers\CommentViewHelper
TYPO3\CMS\Fluid\ViewHelpers\CycleViewHelper
TYPO3\CMS\Fluid\ViewHelpers\ForViewHelper
TYPO3\CMS\Fluid\ViewHelpers\GroupedForViewHelper
TYPO3\CMS\Fluid\ViewHelpers\IfViewHelper
TYPO3\CMS\Fluid\ViewHelpers\ThenViewHelper
TYPO3\CMS\Fluid\ViewHelpers\ElseViewHelper
TYPO3\CMS\Fluid\ViewHelpers\LayoutViewHelper
TYPO3\CMS\Fluid\ViewHelpers\RenderViewHelper
TYPO3\CMS\Fluid\ViewHelpers\SectionViewHelper
TYPO3\CMS\Fluid\ViewHelpers\SpacelessViewHelper
TYPO3\CMS\Fluid\ViewHelpers\Format\CdataViewHelper
TYPO3\CMS\Fluid\ViewHelpers\Format\HtmlspecialcharsViewHelper
TYPO3\CMS\Fluid\ViewHelpers\Format\PrintfViewHelper
TYPO3\CMS\Fluid\ViewHelpers\Format\RawViewHelper
Impact¶
- A warning about use of an unregistered argument
default
will be displayed if templates containf:case
withdefault
argument. - Unexpected template output will be output if templates are rendered which contain
<f:render partial/section optional="1">will be output now</f:render>
. - A warning about use of an unregistered argument
iconOnly
and/orstyleAttributes
will be displayed if templates containf:be.buttons.csh
with either argument. - A warning about use of an unregistered argument
alternateBackgroundColors
will be displayed if templates containf:be.tableList
with that argument. - Any third-party ViewHelpers subclassing any of the classes listed above must change parent class to new namespace.
- Any third-party ViewHelpers using
escapingInterceptorEnabled
property to disable escaping.
Affected Installations¶
Any TYPO3 instance that uses a template which contains:
- An
f:case
withdefault
argument. - An
f:render
withoptional="1"
and having content in the<f:render>
tag. - An
f:be.buttons.csh
with eithericonOnly
orstyleAttributes
(value irrelevant). - An
f:be.tableList
withalternateBackgroundColors
(value irrelevant). - Any third-party ViewHelper which subclasses any of the classes listed above.
- Any third-party ViewHelper which uses
escapingInterceptorEnabled
property to disable escaping.
Migration¶
- Remove the
default
option and changef:case
tof:defaultCase
for that case. - Remove the tag contents of
f:render
. - Remove arguments
iconOnly
andstyleAttributes
fromf:be.buttons.csh
where found. - Remove argument
alternateBackgroundColors
fromf:be.tableList
where found. - Update namespace of parent class in ViewHelpers subclassing any of the classes listed above.
- Update ViewHelper class to use
escapeChildren
and/orescapeOutput
depending on desired behavior.