Skip to content

Missing arguments. (ArgumentCountError 9 arguments are required, 3 given) #47

@vicluber

Description

@vicluber

Hi
Our editor has worked happily with translatelabels 2.2.1 under Typo3 11 for a while now.
I have a site with 7 languages without having almost no issues.
But last week we've added a new language (Japanese) and immediately after translating a page to Japanese, just the page, it doesn't have any content elements yet I've gotten this error on visiting that page:

ArgumentCountError

9 arguments are required, 3 given

in /var/www/html/public/typo3conf/ext/translatelabels/Classes/ViewHelpers/TranslateViewHelper.php line 144

if (ApplicationType::fromRequest($GLOBALS['TYPO3_REQUEST'])->isFrontend()) { $id = TranslationLabelUtility::getExtendLabelKeyWithLanguageFilePath($id, $extensionName); $value = TranslationLabelUtility::readLabelFromDatabase($id, $value); if (\is_array($translateArguments) && $value !== null) { $value = sprintf($value, ...array_values($translateArguments)) ?: sprintf('Error: could not translate key "%s" with value "%s" and %d argument(s)!', $key, $value, count($translateArguments)); } if (TranslationLabelUtility::isFrontendWithLoggedInBEUser($id, $extensionName)) { $value = TranslationLabelUtility::renderTranslationWithExtendedInformation($id, $value, $extensionName, $translateArguments, $arguments['languageKey'], $arguments['alternativeLanguageKeys']); } }

Indeed the $translateArguments variable is null. Is this a known issue? Is this a translatelabels issue even? Or am I just missing something?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions