Actions
Bug #87948
closeduseDefaultLanguageRecord = 1 uses the translated record UID
Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Localization
Target version:
-
Start date:
2019-03-19
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
no-brainer
Is Regression:
Sprint Focus:
Description
The documentation (https://docs.typo3.org/typo3cms/TSconfigReference/PageTsconfig/TceMain.html#preview) says:
The useDefaultLanguageRecord defaults to 1 and ensures that translated records will use the uid of the default record for the preview link. You may disable this, if your extension can deal with the uid of translated records.
So if useDefaultLanguageRecord = 1
-> $recordId should be the UID of the record with sys_language_uid = 0.
If you have a look to the code (shortened):
if ($languageField && !empty($recordArray[$languageField])) { $l18nPointer = $GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField'] ?? ''; if ($l18nPointer && !empty($recordArray[$l18nPointer]) && isset($previewConfiguration['useDefaultLanguageRecord']) && !$previewConfiguration['useDefaultLanguageRecord'] ) { // use parent record $recordId = $recordArray[$l18nPointer]; } }
There is a !$previewConfiguration['useDefaultLanguageRecord']
which turns a useDefaultLanguageRecord = 1 into false and the recordId will never be set to the original language record.
This is a logical problem.
Actions