Review main Merged

95020[BUGFIX] Resolve file metadata translations in every context

Benni Mack CR +2 V +2 Normal +135 −96 updated 10/02/26, 13:35

Commit message

MetaDataRepository always reads the metadata of a file in the default
language. The translation is put on top afterwards by
FileMetadataOverlayAspect, an event listener that returns early unless
the current request is a frontend request. Backend modules, command
controllers and eID requests therefore never see a translated
sys_file_metadata record, no matter which language they ask for.

The repository now resolves the workspace and the language version of
the record itself, right after reading the default language row and
before dispatching EnrichFileMetaDataEvent. Listeners of that event
receive the resolved record now, which is the record they should
enrich in the first place.

FileMetadataOverlayAspect has become obsolete and is removed, together
with its check on $GLOBALS['TYPO3_REQUEST']. Its functional test is
renamed and moved, as it no longer covers a class in EXT:frontend.

A metadata record deleted in the current workspace is not resolved,
but saving metadata then updates the live record instead of creating
a second one.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Oli Bartsch +1
    • Simon Schaufelberger +1
  • Verified V +2 Done
    • Benni Mack +2
    • Oli Bartsch +1
    • Simon Schaufelberger +1
    • core-ci +1 CI

Issues 2

Files 12

Review log 1217

  1. Benni Mack uploaded patch set 1 07/30/26, 12:41

  2. core-ci voted on patch set 1 V -1 07/30/26, 12:48 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/105690

  3. Benni Mack uploaded patch set 2 V -1 09/30/26, 21:34

  4. Benni Mack marked it ready for review 09/30/26, 21:34

  5. core-ci voted on patch set 2 V -1 09/30/26, 21:47 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/109722

  6. Benni Mack uploaded patch set 3 V -1 10/01/26, 08:43

  7. core-ci voted on patch set 3 V +1 10/01/26, 08:52 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/109773

  8. Benni Mack commented on patch set 4 V +1 10/01/26, 10:36

    Published edit on patch set 3.
  9. core-ci voted on patch set 4 V +1 10/01/26, 10:43 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/109783

  10. Oli Bartsch commented on patch set 4 V -1 10/01/26, 12:05

    on it.......
  11. Oli Bartsch uploaded patch set 5 V +1 10/01/26, 12:19

  12. Oli Bartsch commented on patch set 5 10/01/26, 12:21

    Reply

    Found some workspace regression:. For a delete placeholder, versionOL() returns false, so save() creates a second live sys_file_metadata row. I have fixed this. save() falls back to the raw row and updates live. I also dropped a duplicate test and corrected the RST ordering sentence.
  13. core-ci voted on patch set 5 V +1 10/01/26, 12:27 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/109789

  14. Oli Bartsch voted on patch set 5 CR +1 V +1 10/01/26, 12:32

  15. Simon Schaufelberger voted on patch set 5 CR +1 V +1 10/02/26, 00:04

  16. Benni Mack voted on patch set 5 CR +2 V +2 10/02/26, 13:35

  17. Benni Mack merged patch set 6 10/02/26, 13:35