Skip to content
Snippets Groups Projects
Commit bb2fca15 authored by Oliver Bartsch's avatar Oliver Bartsch
Browse files

[BUGFIX] Resolve default value in f:translate on time

Some components in the Core allow to either define
locallang references or static labels. To process them
in a template, usually the f:translate ViewHelper is used.

Since the value will be dynamically and a static label
as "key" will lead to an exception in non extbase context,
the dynamic value must also be defined as the default,
which will be used by the ViewHelper, in case the "key"
can not be resolved.

There are two possibilities to define the default. Either
by setting the "default" attribute or by adding the value
as tag content. Latter failed since #96473 because the
tag content was resolved too late.

The previous behaviour is now restored by evaluating
a possible default value before processing the "key".

Resolves: #96964
Related: #96473
Releases: main
Change-Id: If932d2de14b8b58005051a03ccf7be290b66ddd9
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/73599


Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: default avatarStefan Bürk <stefan@buerk.tech>
Tested-by: default avatarOliver Bartsch <bo@cedev.de>
Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: default avatarStefan Bürk <stefan@buerk.tech>
Reviewed-by: default avatarOliver Bartsch <bo@cedev.de>
parent 302cd4e3
No related merge requests found
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment