Review main Merged

88137[BUGFIX] Show all file references even when one is missing

Garvin Hicking CR +2 V +2 Easy +1 −1 updated 02/11/25, 11:25

Commit message

ElementInformationController shows links to resolved entries
of `sys_refindex`, which can be links/records but also files.

In case of a `sys_file_reference` entry, the code stopped
the whole execution workflow and did not process any
further elements.

This patch allows the foreach() loop to continue in case
of missing file references.

Review

  • Code review CR +2 Done
    • Andreas Kienast +2
    • Oliver Wand +1
    • Christian Kuhn +1
  • Verified V +2 Done
    • Andreas Kienast +2
    • Christian Kuhn +1
    • core-ci +1 CI

Issues 1

Files 1

Review log 89

  1. Garvin Hicking uploaded patch set 1 02/10/25, 15:05

  2. Christian Kuhn voted on patch set 1 CR +1 V +1 02/10/25, 15:08

  3. Oliver Wand voted on patch set 1 CR +1 02/10/25, 15:11

  4. core-ci voted on patch set 1 V +1 02/10/25, 15:13 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/73898

  5. Christian Kuhn voted on patch set 1 V 0 02/10/25, 15:32

  6. Garvin Hicking commented on patch set 1 02/11/25, 08:35

    Here's how you can reproduce the issue: - Create new content element on a page (e.g. textmedia) (for me: tt_content.uid=2713) - Assign picture: upload a new file and assign it (for me: sys_file.uid=66770 + sys_file_reference.uid=5050) - This creates these sys_refindex entries: - recuid=2713, tablename=tt_content, field=image, ref_table = sys_file_reference, ref_uid = 5050 - recuid=5050, tablename=sys_file_reference, field=uid_local, ref_table = sys_file, ref_uid = 66770 - Create another CE (tt_content.uid=2714) - Assing THE SAME picture again (sys_file_reference.uid=5051) - This creates these sys_refindex entries: - recuid=2714, tablename=tt_content, field=image, ref_table = sys_file_reference, ref_uid = 5050 - recuid=5051, tablename=sys_file_reference, field=uid_local, ref_table = sys_file, ref_uid = 66770 - Now go to the file list, pick the picture, click it's "i" info element, scroll to the reference section at the bottom - Two references will be shown, to 2713 and 2714 - NOW: Remove sys_refindex with recuid=5050 in the database or remove sys_file_reference.uid=5050 (you need to do that in the database directly, a deleted=1 record will NOT suffice because then relations will still be resolved, as these ignore deleted-restrictions) - Then the popup will show NO reference anymore, instead of showing the one remaining reference. - When applying the patch, the second reference will appear.
  7. Christian Kuhn voted on patch set 1 V +1 02/11/25, 09:57

  8. Andreas Kienast voted on patch set 1 CR +2 V +2 02/11/25, 11:24

  9. Andreas Kienast merged patch set 2 02/11/25, 11:25