Bug #88045

alternativeLanguageKeys is overridden as string

Added by Jan Delius 6 months ago. Updated about 2 months ago.

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

100%

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 Bugfix Resolved 2019-08-19
Duplicated by TYPO3 Core - Bug #88405: LocalizationUtility requires array for alternative Languages Resolved 2019-05-20

Associated revisions

Revision e58f47f7 (diff)
Added by Jan Delius about 2 months ago

[BUGFIX] Fill alternative language keys correctly

This change adds the language dependencies individually to the array
instead of completely overwriting them as a string. Since the
dependencies are iterated in the core, this function only adds to the
array instead of overwriting the first index.

Resolves: #88045
Releases: master, 9.5
Change-Id: I3101bf8f9873ffa5ceeee3cc9e9ace36858f39a4
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/60356
Tested-by: TYPO3com <>
Tested-by: theline <>
Tested-by: Benjamin Kott <>
Tested-by: Georg Ringer <>
Reviewed-by: theline <>
Reviewed-by: Benjamin Kott <>
Reviewed-by: Georg Ringer <>

Revision 7d0ed02e (diff)
Added by Georg Ringer about 2 months ago

[BUGFIX] Fill alternative language keys correctly

This change adds the language dependencies individually to the array
instead of completely overwriting them as a string. Since the
dependencies are iterated in the core, this function only adds to the
array instead of overwriting the first index.

Resolves: #88045
Releases: master, 9.5
Change-Id: I3101bf8f9873ffa5ceeee3cc9e9ace36858f39a4
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/61406
Tested-by: TYPO3com <>
Tested-by: Andreas Fernandez <>
Reviewed-by: Andreas Fernandez <>

Revision 1d55adf3 (diff)
Added by Oliver Bartsch about 1 month ago

[TASK] Add .rst file for 88045

Add information about possible workaround configuration
which need to be adapted.

Resolves: #88976
Related: #88045
Releases: master, 9.5
Change-Id: I608038371de450c26e90b348ba3de0dcb4b51e36
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/61512
Tested-by: TYPO3com <>
Tested-by: Anja Leichsenring <>
Tested-by: Andreas Fernandez <>
Reviewed-by: Anja Leichsenring <>
Reviewed-by: Andreas Fernandez <>

Revision f7eae130 (diff)
Added by Oliver Bartsch about 1 month ago

[TASK] Add .rst file for 88045

Add information about possible workaround configuration
which need to be adapted.

Resolves: #88976
Related: #88045
Releases: master, 9.5
Change-Id: I608038371de450c26e90b348ba3de0dcb4b51e36
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/61471
Tested-by: TYPO3com <>
Tested-by: Andreas Fernandez <>
Reviewed-by: Andreas Fernandez <>

History

#1 Updated by Gerrit Code Review 6 months 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 6 months ago

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

#3 Updated by Jan Delius 4 months ago

  • Duplicated by Bug #88405: LocalizationUtility requires array for alternative Languages added

#4 Updated by Gerrit Code Review about 2 months 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 months 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 months 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 months ago

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

#8 Updated by Gerrit Code Review about 2 months 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 months ago

  • Status changed from Under Review to Resolved

#10 Updated by Oliver Bartsch about 1 month ago

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

Also available in: Atom PDF