Breaking: #69863 - Changes in ViewHelpers post Standalone-Fluid
See forge#69863
Description
The following ViewHelpers have changed behaviours in Fluid:
- The
f:
ViewHelper argumentcase default
has been marked as deprecated. To indicate which case is the default, usef:
.default Case - Tag content of
f:
is no longer ignored and will be output if called withrender optional="1"
. - Arguments
icon
andOnly style
have been removed fromAttributes f:
.be. buttons. csh - Argument
alternate
has been removed fromBackground Colors f:
.be. table List - ViewHelpers no longer use the
escaping
property but instead useInterceptor Enabled escape
andChildren escape
to control each behavior.Output - All ViewHelpers no longer initialize standard arguments ("additionalArguments" and "data") in
__
, but instead do this inconstruct () initialize
. If you override this method, you need to make sure you include a call toArguments () parent::
in your subclass.initialize Arguments ()
The following ViewHelper classes are now only found in namespace TYPO3Fluid\
and no longer exist in TYPO3\
:
TYPO3\
CMS\ Fluid\ View Helpers\ Alias View Helper TYPO3\
CMS\ Fluid\ View Helpers\ Switch View Helper TYPO3\
(present as deprecated alias until final removal)CMS\ Fluid\ View Helpers\ Case View Helper TYPO3\
CMS\ Fluid\ View Helpers\ Comment View Helper TYPO3\
CMS\ Fluid\ View Helpers\ Cycle View Helper TYPO3\
CMS\ Fluid\ View Helpers\ For View Helper TYPO3\
CMS\ Fluid\ View Helpers\ Grouped For View Helper TYPO3\
CMS\ Fluid\ View Helpers\ If View Helper TYPO3\
CMS\ Fluid\ View Helpers\ Then View Helper TYPO3\
CMS\ Fluid\ View Helpers\ Else View Helper TYPO3\
CMS\ Fluid\ View Helpers\ Layout View Helper TYPO3\
CMS\ Fluid\ View Helpers\ Render View Helper TYPO3\
CMS\ Fluid\ View Helpers\ Section View Helper TYPO3\
CMS\ Fluid\ View Helpers\ Spaceless View Helper TYPO3\
CMS\ Fluid\ View Helpers\ Format\ Cdata View Helper TYPO3\
CMS\ Fluid\ View Helpers\ Format\ Htmlspecialchars View Helper TYPO3\
CMS\ Fluid\ View Helpers\ Format\ Printf View Helper TYPO3\
CMS\ Fluid\ View Helpers\ Format\ Raw View Helper
Impact
- A warning about use of an unregistered argument
default
will be displayed if templates containf:
withcase default
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
icon
and/orOnly style
will be displayed if templates containAttributes f:
with either argument.be. buttons. csh - A warning about use of an unregistered argument
alternate
will be displayed if templates containBackground Colors f:
with that argument.be. table List - Any third-party ViewHelpers subclassing any of the classes listed above must change parent class to new namespace.
- Any third-party ViewHelpers using
escaping
property to disable escaping.Interceptor Enabled
Affected Installations
Any TYPO3 instance that uses a template which contains:
- An
f:
withcase default
argument. - An
f:
withrender optional="1"
and having content in the<f:
tag.render> - An
f:
with eitherbe. buttons. csh icon
orOnly style
(value irrelevant).Attributes - An
f:
withbe. table List alternate
(value irrelevant).Background Colors - Any third-party ViewHelper which subclasses any of the classes listed above.
- Any third-party ViewHelper which uses
escaping
property to disable escaping.Interceptor Enabled
Migration
- Remove the
default
option and changef:
tocase f:
for that case.default Case - Remove the tag contents of
f:
.render - Remove arguments
icon
andOnly style
fromAttributes f:
where found.be. buttons. csh - Remove argument
alternate
fromBackground Colors f:
where found.be. table List - Update namespace of parent class in ViewHelpers subclassing any of the classes listed above.
- Update ViewHelper class to use
escape
and/orChildren escape
depending on desired behavior.Output