Bug #93033
closedLanguage switch missing for file metadata records
100%
Description
When editing file metadata records (sys_file_metadata
), the language switch is missing.
From my observations the switch was there in v8 and is gone in v10.
According to xdebug the EditDocumentController->getLanguages()
always determines English is the only available language for sys_file_metadata
on pid 0.
The file list however has a different logic. From there metadata can be translated into any system language (FileList->getAvailableSystemLanguages()
).
Files
Updated by Mathias Brodala about 4 years ago
- File 2020-12-22_17-22.png 2020-12-22_17-22.png added
- File 2020-12-22_17-23.png 2020-12-22_17-23.png added
In fact translation of records on pid=0
is not possible anymore, e.g. sys_category
.
When trying to translate file metadata through the file list module, an error occurs:
Updated by Mathias Brodala about 4 years ago
Sorry, my fault: I actually forgot to add the sys_language
record in this instance.
Still, there is no language selector anymore as mentioned here.
Updated by Mathias Brodala about 4 years ago
In any case translation of files is still possible through the File list module. This also makes it necessary to go back when editing multiple file metadata translations.
Updated by Mathias Brodala about 4 years ago
- Related to Task #85930: Add API for Site resolving added
Updated by Gerrit Code Review over 3 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/+/69721
Updated by Gerrit Code Review over 3 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/+/69721
Updated by Gerrit Code Review over 3 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/+/69721
Updated by Gerrit Code Review over 3 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/+/69721
Updated by Gerrit Code Review over 3 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/+/69721
Updated by Benni Mack over 3 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 14d509cc2371560a52554fbe322e120ccec95262.
Updated by TTG Team Web over 3 years ago
- File allLanguages.PNG allLanguages.PNG added
- File languageswitcher.PNG languageswitcher.PNG added
Hi,
we have a multidomain TYPO3 project currently running with TYPO3 10.4.20.
The language switch for file metadata records is displayed, but the option for "Deutsch" is filled with all german site configuration entries, e.g. "Deutsch [Site: site-1]", "Deutsch [Site: site-2]", ... entries.
I think the problem is that $allLanguages is fetched in sysext/backend/Classes/Controller/EditDocumentController.php with $pageId = 0. In the returned array the field title has all german entries from site configuration (see allLanguages.png)
$allLanguages = array_filter(
GeneralUtility::makeInstance(TranslationConfigurationProvider::class)->getSystemLanguages($pageId),
static function (array $language): bool {
return (int)$language['uid'] !== -1;
}
);