Review main Merged

94672[BUGFIX] Show only metadata fields of the file type in file info

Gianluigi Martino CR +2 V +2 Normal +148 −13 updated 11/13/26, 09:40

Commit message

The element information of a file lists the sys_file_metadata
fields of the file. sys_file_metadata takes its record type from
the related sys_file record ("file:type"), which the
VisibleSchemaFieldsCollector cannot resolve from the metadata row.
In addition, all searchable fields of the table were merged into
the list. Both lead to all metadata columns being shown for every
file type, e.g. width and height with a value of 0 for videos.

For images, width and height were shown twice, as they are already
shown explicitly with a "px" unit.

The VisibleSchemaFieldsCollector now accepts an optional record type,
which the ElementInformationController sets to the type of the file.
Searchable fields are no longer merged into the metadata fields, and
width and height are skipped in the metadata of images.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Georg Ringer +1
  • Verified V +2 Done
    • Benni Mack +2
    • Georg Ringer +1
    • core-ci +1 CI

Issues 1

Files 8

Review log 913

  1. Gianluigi Martino uploaded patch set 1 07/03/26, 13:17

  2. core-ci voted on patch set 1 V +1 07/03/26, 13:29 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/104289

  3. Gianluigi Martino updated the commit message in patch set 2 V +1 07/03/26, 13:31

  4. core-ci voted on patch set 2 V +1 07/03/26, 13:38 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/104290

  5. Riccardo De Contardi commented on patch set 2 07/03/26, 15:01

    It works for images but... for non-image files (I tested with a pdf and an mp4 movie), the "plain numbers" "width" and "height" are shown instead, with... 0 as value. I can guess that this is the expected behavior, but I'm wondering how much sense there is in showing the width and height for non-image files...I guess they will always show 0...or not?
  6. Gianluigi Martino rebased onto patch set 3 V +1 11/13/26, 08:16

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

  8. Benni Mack uploaded patch set 4 V +1 11/13/26, 08:35

  9. core-ci voted on patch set 4 V +1 11/13/26, 08:42 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/114289

  10. Benni Mack voted on patch set 4 CR +1 V +1 11/13/26, 09:05

  11. Georg Ringer voted on patch set 4 CR +1 V +1 11/13/26, 09:34

  12. Benni Mack voted on patch set 4 CR +2 V +2 11/13/26, 09:40

  13. Benni Mack merged patch set 5 11/13/26, 09:40