Review 13.4 Merged

94979[BUGFIX] Avoid TypeError for IMAGE cObject with missing file

Garvin Hicking CR +2 V +2 Normal +94 −0 updated 08/03/26, 16:49

Commit message

When an IMAGE content object references a FAL file whose
physical file has been deleted (sys_file.missing=1),
ImageResource::getPublicUrl() returns null and cImage()
passes it to AssetCollector::addMedia(), which requires a
string. The TypeError aborts the whole page rendering.

Treat a null public URL like an unresolvable image resource
and return an empty string, as the method already does when
getImgResource() returns null. This restores the behavior
of v12 and earlier.

Review

  • Code review CR +2 Done
    • Garvin Hicking +2
  • Verified V +2 Done
    • Garvin Hicking +2
    • core-ci +1 CI

Issues 1

Files 3

Review log 712

  1. Garvin Hicking commented on patch set 1 07/29/26, 08:00

    Cherry Picked from branch main. The following files contain Git conflicts: * typo3/sysext/frontend/Classes/ContentObject/ImageContentObject.php * typo3/sysext/frontend/Tests/Functional/ContentObject/ImageContentObjectTest.php
  2. core-ci voted on patch set 1 V -1 07/29/26, 08:04 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/105572

  3. Garvin Hicking commented on patch set 2 V -1 07/29/26, 08:23

    Published edit on patch set 1.
  4. core-ci voted on patch set 2 V -1 07/29/26, 08:29 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/105573

  5. Garvin Hicking commented on patch set 3 V -1 07/29/26, 08:34

    Published edit on patch set 2.
  6. core-ci voted on patch set 3 V -1 07/29/26, 08:44 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/105574

  7. Garvin Hicking uploaded patch set 4 V -1 08/03/26, 14:09

    adapted backport
  8. core-ci voted on patch set 4 V -1 08/03/26, 14:16 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/105894

  9. Garvin Hicking commented on patch set 5 V -1 08/03/26, 15:14

    Published edit on patch set 4.
  10. core-ci voted on patch set 5 V +1 08/03/26, 15:20 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/105897

  11. Garvin Hicking commented on patch set 5 CR +2 V +2 08/03/26, 15:48

    This change is ready for review.
  12. Garvin Hicking merged patch set 6 08/03/26, 16:49