Project

General

Profile

Actions

Bug #93033

closed

Language switch missing for file metadata records

Added by Sebastian Michaelsen over 3 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Localization
Target version:
-
Start date:
2020-12-09
Due date:
% Done:

100%

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

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

2020-12-22_17-22.png (8.73 KB) 2020-12-22_17-22.png Mathias Brodala, 2020-12-22 16:22
2020-12-22_17-23.png (7.56 KB) 2020-12-22_17-23.png Mathias Brodala, 2020-12-22 16:22
allLanguages.PNG (13.3 KB) allLanguages.PNG Team Web Web, 2021-09-09 07:33
languageswitcher.PNG (12.8 KB) languageswitcher.PNG Team Web Web, 2021-09-09 07:34

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Task #85930: Add API for Site resolvingClosedBenni Mack2018-08-22

Actions
Actions #1

Updated by Sebastian Michaelsen over 3 years ago

  • Description updated (diff)

Updated by Mathias Brodala over 3 years ago

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:


Actions #3

Updated by Mathias Brodala over 3 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.

Actions #4

Updated by Mathias Brodala over 3 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.

Actions #5

Updated by Mathias Brodala over 3 years ago

  • Related to Task #85930: Add API for Site resolving added
Actions #6

Updated by Riccardo De Contardi about 3 years ago

  • Category set to Localization
Actions #7

Updated by Gerrit Code Review almost 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

Actions #8

Updated by Gerrit Code Review almost 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

Actions #9

Updated by Gerrit Code Review almost 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

Actions #10

Updated by Gerrit Code Review almost 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

Actions #11

Updated by Gerrit Code Review almost 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

Actions #12

Updated by Benni Mack almost 3 years ago

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

Updated by Benni Mack over 2 years ago

  • Status changed from Resolved to Closed

Updated by Team Web Web over 2 years ago

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;
            }
        );
Actions

Also available in: Atom PDF