Breaking: #69863 - Changes in ViewHelpers post Standalone-Fluid¶
See Issue #69863
Description¶
The following ViewHelpers have changed behaviours in Fluid:
- The
f:caseViewHelper argumentdefaulthas been marked as deprecated. To indicate which case is the default, usef:defaultCase. - Tag content of
f:renderis no longer ignored and will be output if called withoptional="1". - Arguments
iconOnlyandstyleAttributeshave been removed fromf:be.buttons.csh. - Argument
alternateBackgroundColorshas been removed fromf:be.tableList. - ViewHelpers no longer use the
escapingInterceptorEnabledproperty but instead useescapeChildrenandescapeOutputto 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\AliasViewHelperTYPO3\CMS\Fluid\ViewHelpers\SwitchViewHelperTYPO3\CMS\Fluid\ViewHelpers\CaseViewHelper(present as deprecated alias until final removal)TYPO3\CMS\Fluid\ViewHelpers\CommentViewHelperTYPO3\CMS\Fluid\ViewHelpers\CycleViewHelperTYPO3\CMS\Fluid\ViewHelpers\ForViewHelperTYPO3\CMS\Fluid\ViewHelpers\GroupedForViewHelperTYPO3\CMS\Fluid\ViewHelpers\IfViewHelperTYPO3\CMS\Fluid\ViewHelpers\ThenViewHelperTYPO3\CMS\Fluid\ViewHelpers\ElseViewHelperTYPO3\CMS\Fluid\ViewHelpers\LayoutViewHelperTYPO3\CMS\Fluid\ViewHelpers\RenderViewHelperTYPO3\CMS\Fluid\ViewHelpers\SectionViewHelperTYPO3\CMS\Fluid\ViewHelpers\SpacelessViewHelperTYPO3\CMS\Fluid\ViewHelpers\Format\CdataViewHelperTYPO3\CMS\Fluid\ViewHelpers\Format\HtmlspecialcharsViewHelperTYPO3\CMS\Fluid\ViewHelpers\Format\PrintfViewHelperTYPO3\CMS\Fluid\ViewHelpers\Format\RawViewHelper
Impact¶
- A warning about use of an unregistered argument
defaultwill be displayed if templates containf:casewithdefaultargument. - 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
iconOnlyand/orstyleAttributeswill be displayed if templates containf:be.buttons.cshwith either argument. - A warning about use of an unregistered argument
alternateBackgroundColorswill be displayed if templates containf:be.tableListwith 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
escapingInterceptorEnabledproperty to disable escaping.
Affected Installations¶
Any TYPO3 instance that uses a template which contains:
- An
f:casewithdefaultargument. - An
f:renderwithoptional="1"and having content in the<f:render>tag. - An
f:be.buttons.cshwith eithericonOnlyorstyleAttributes(value irrelevant). - An
f:be.tableListwithalternateBackgroundColors(value irrelevant). - Any third-party ViewHelper which subclasses any of the classes listed above.
- Any third-party ViewHelper which uses
escapingInterceptorEnabledproperty to disable escaping.
Migration¶
- Remove the
defaultoption and changef:casetof:defaultCasefor that case. - Remove the tag contents of
f:render. - Remove arguments
iconOnlyandstyleAttributesfromf:be.buttons.cshwhere found. - Remove argument
alternateBackgroundColorsfromf:be.tableListwhere found. - Update namespace of parent class in ViewHelpers subclassing any of the classes listed above.
- Update ViewHelper class to use
escapeChildrenand/orescapeOutputdepending on desired behavior.