Review main Merged

93333[BUGFIX] Keep uid and pid in export record data for sys_file handling

Benjamin Kott CR +2 V +2 Normal +51 −23 updated 03/25/26, 09:01

Commit message

The schema-based filtering introduced in #109119 strips uid and pid
from the record data sub-array since they are not defined as TCA
schema fields. While the header array stores them separately, the
exportAddSysFile() method reads from the data array and constructs
a File object that requires uid to resolve metadata, resulting in
an InvalidUidException when exporting pages with file relations
without explicit recordTypesIncludeFields.

The fix ensures filterRecordFields() consistently includes uid and
pid via defaultRecordIncludeFields in both the recordTypesIncludeFields
and the schema-based filtering paths. In addition, exportAddSysFile()
now uses ResourceFactory::getFileObject() to load the indexed file
directly by UID instead of constructing it from the data array.

Review

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

Issues 2

Files 3

Review log 811

  1. Benjamin Kott uploaded patch set 1 03/24/26, 14:53

  2. Benni Mack voted on patch set 1 CR +1 V +1 03/24/26, 14:56

  3. core-ci voted on patch set 1 V +1 03/24/26, 15:06 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/98605

  4. Benjamin Kott rebased onto patch set 2 CR +1 V +1 03/24/26, 23:11

  5. core-ci voted on patch set 2 V -1 03/24/26, 23:31 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/98629

  6. Benjamin Kott rebased onto patch set 3 V -1 03/25/26, 07:35

  7. core-ci voted on patch set 3 V +1 03/25/26, 08:13 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/98654

  8. Benni Mack voted on patch set 3 CR +1 V +1 03/25/26, 08:36

  9. Simon Schaufelberger voted on patch set 3 CR +1 V +1 03/25/26, 08:44

  10. Benjamin Kott voted on patch set 3 CR +2 V +2 03/25/26, 09:01

  11. Benjamin Kott merged patch set 4 03/25/26, 09:01