Bug #88045

alternativeLanguageKeys is overridden as string

Added by Jan Delius over 2 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Localization
Target version:
-
Start date:
2019-04-01
Due date:
% Done:

100%

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

Description

The function getLanguageKeys in the Extbase LocalizationUtility resolves the dependency of a language as "alternativeLanguageKeys". However, the empty array is overwritten by a string instead of supplementing it.

The following error is thrown in the frontend:
Argument 3 passed to TYPO3\CMS\Extbase\Utility\LocalizationUtility::initializeLocalization() must be of the type array, string given, called in [...]/typo3/sysext/extbase/Classes/Utility/LocalizationUtility.php on line 96

See typo3conf/sysext/extbase/Classes/Utility/LocalizationUtility.php:210

As example language you can use Brazilian Portuguese


Related issues

Related to TYPO3 Core - Task #88976: Add ReST file for BugfixClosedOliver Bartsch2019-08-19

Actions
Has duplicate TYPO3 Core - Bug #88405: LocalizationUtility requires array for alternative LanguagesClosed2019-05-20

Actions
#1

Updated by Gerrit Code Review over 2 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60356

#2

Updated by Jan Delius over 2 years ago

  • Subject changed from alternativeLanguageKeys is overriden as string to alternativeLanguageKeys is overridden as string
#3

Updated by Jan Delius over 2 years ago

  • Has duplicate Bug #88405: LocalizationUtility requires array for alternative Languages added
#4

Updated by Gerrit Code Review about 2 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60356

#5

Updated by Gerrit Code Review about 2 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60356

#6

Updated by Georg Ringer about 2 years ago

How to reproduce:

  1. Create a sys_language record PT.
  2. Create a site language and select pt_BR at the field Language Key for XLF Files
  3. Create a new page and translate it to PT.
  4. Open up your page template and insert something like
    <f:translate key="LLL:EXT:about/Resources/Private/Language/Modules/about.xlf:mlang_labels_tablabel" />
  5. Open page in frontend and see the exception
  6. Apply patch and see translation in PT
#7

Updated by Jan Delius about 2 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
#8

Updated by Gerrit Code Review about 2 years ago

  • Status changed from Resolved to Under Review

Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61406

#9

Updated by Georg Ringer about 2 years ago

  • Status changed from Under Review to Resolved
#10

Updated by Oliver Bartsch about 2 years ago

  • Related to Task #88976: Add ReST file for Bugfix added
#11

Updated by Benni Mack almost 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF