Bug #87948
closeduseDefaultLanguageRecord = 1 uses the translated record UID
100%
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.
Updated by Gerrit Code Review over 5 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/+/60297
Updated by Gerrit Code Review over 5 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/+/60297
Updated by Benni Mack over 5 years ago
- Category changed from Miscellaneous to Localization
Updated by Gerrit Code Review about 5 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/+/60297
Updated by Gerrit Code Review over 4 years ago
Patch set 4 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/+/60297
Updated by Gerrit Code Review over 4 years ago
Patch set 5 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/+/60297
Updated by Gerrit Code Review over 4 years ago
Patch set 6 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/+/60297
Updated by Gerrit Code Review over 4 years ago
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/+/63785
Updated by Anonymous over 4 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset f8f687065556a4a87c11ab41056b6781b1b04f74.