#102580Translate ViewHelper does not use default argument when non existing key is given
Description
When using the translate ViewHelper in TYPO3 12.4.8 with a non existing key the default value is ignored. This worked in TYPO3 11.5.x and before.
Example:
<f:translate key="non.existing.key" default="some default text"></f:translate>
Expected output would be “some default text” but actual output is “”.
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
History 6
-
Oliver Bartsch commented and changed status
NewNeeds Feedback 01/02/24, 13:29 -
Felix Nagel commented 01/05/24, 15:19
You are right. It’s not a general issue but something within my extension (https://github.com/fnagel/t3extblog). I’ve tried to figure out what exactly by removing most PHP code, TS configuration, TSconfig, routing, etc. but the error won’t go away. This still worked in TYPO3 v11 :-(
A strange behavior I’ve noticed is that this does work when I use a WRONG “extensionName” argument in the VH code. How is that possible?
Any idea what might be the issue here?
-
Benni Mack commented 01/30/24, 14:26
> Any idea what might be the issue here?
Hey Felix,
do you run your extension in middleware or something along the lines? Can you share the Fluid code how this happened?
-
Georg Ringer commented and changed status
Needs FeedbackRejected 06/11/24, 04:38I am closing this issue as it is not a core issue and lack of feedback how to possible reproduce.
feel free to reopen a new issue and reference this one if still valid -
Felix Nagel commented 12/30/24, 11:00
Sorry for the late response. I’m no longer able to to reproduce this in a clean TYPO3 v13 instance.
-
Benni Mack commented 12/30/24, 11:41
Felix Nagel wrote in #note-5:
> Sorry for the late response. I’m no longer able to to reproduce this in a clean TYPO3 v13 instance.Thanks for this feedback, Felix!
Hi, thanks for reporting. I just checked this on latest main and latest 12.4 and was not able to reproduce the reported bug. The default is displayed as expected. Could you please verify whether this is also fixed for you?
Best, Oli