Project

General

Profile

Actions

Bug #99264

closed

ArgumentCountError by usage of f:translate viewhelper

Added by Alex Kellner over 1 year ago. Updated about 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2022-12-04
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
12
PHP Version:
8.1
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

If I try to make the "old" extension work again in TYPO3 12, the error occurs:

ArgumentCountError, 6 arguments are required, 1 given
in .../vendor/typo3/cms-extbase/Classes/Utility/LocalizationUtility.php line 132

The call that throws the exception seems to be this markup in Fluid:

<f:translate key="date">test</f:translate>

Error occures in a backend module in TYPO3 12.0.0


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #98924: Harden LocalizationUtility with argumentsClosed2022-10-26

Actions
Actions #1

Updated by Alex Kellner over 1 year ago

  • Description updated (diff)

Specified description

Same happens with this markup:

<f:translate key="LLL:EXT:luxletter/Resources/Private/Language/locallang.xlf:date">test</f:translate>

Actions #2

Updated by Alex Kellner over 1 year ago

Another update:
Seems to rely on the locallang value - maybe a problem with "%"

<trans-unit id="date">
    <source>%Y-%m-%d, %H:%M</source>
</trans-unit>

This helps:

<trans-unit id="date">
    <source>Y-m-d, H:i</source>
</trans-unit>

Also CDATA helps:

<trans-unit id="date">
    <source><![CDATA[%Y-%m-%d, %H:%M]]></source>
</trans-unit>

Actions #3

Updated by Georg Ringer over 1 year ago

  • Status changed from New to Needs Feedback

can you please test the dev version of core. Looks like #98924 which I ran into with ext:news and fixed it

Actions #4

Updated by Georg Ringer over 1 year ago

  • Related to Bug #98924: Harden LocalizationUtility with arguments added
Actions #5

Updated by Alex Kellner over 1 year ago

I would try, but if I go on dev-main, I cannot login into backend any more (cache flush and db compare did not help). Problem here:

#1264023823 InvalidArgumentException
"luxletter.localhost.de-8ca9805574671b9c-table-be_sessions" is not a valid cache entry identifier.

Actions #6

Updated by Andreas Kienast over 1 year ago

Alex Kellner wrote in #note-5:

I would try, but if I go on dev-main, I cannot login into backend any more (cache flush and db compare did not help). Problem here:
[...]

Can you please provide a stacktrace (and optionally create a new ticket for this)? Fixing this issue seems to be a low-hanging fruit.
Please see #99276 for a bugfix.

Actions #7

Updated by Alex Kellner over 1 year ago

Thx, works now as expected in 12.1.0

Actions #8

Updated by Benni Mack about 1 year ago

  • Status changed from Needs Feedback to Closed

closing the issue now, thanks for confirmation alex

Actions

Also available in: Atom PDF