Review main Merged

86194[BUGFIX] Use proper FileReference for imageLinkWrap

Garvin Hicking CR +2 V +2 Easy +5 −0 updated 10/23/24, 17:20

Commit message

In a TypoScript configuration like:

```
lib.testImage = IMAGE
lib.testImage.file = fileadmin/something.jpg
```

an image gets resolved in ContentObjectRenderer via
getFileObject(), which can return a ProcessedFile.

For these objects, there is no 'process' method.

This patch properly resolves to the original file
to apply the processing on.

Review

  • Code review CR +2 Done
    • Garvin Hicking +2
    • Franz Holzinger +1
    • Benni Mack +1
  • Verified V +2 Done
    • Garvin Hicking +2
    • Franz Holzinger +1
    • Benni Mack +1

Issues 1

Files 1

Review log 1516

  1. Garvin Hicking uploaded patch set 1 09/19/24, 07:43

  2. Mathias Brodala commented on patch set 1 09/19/24, 07:46

    ContentObjectRenderer.php:903

    I wonder if we should restrict the fix to this instead since this is the method which can lead to $file being a ProcessedFile.
  3. core-ci voted on patch set 1 V +1 09/19/24, 07:59 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/66175

  4. Garvin Hicking commented on patch set 1 09/19/24, 08:07

    ContentObjectRenderer.php:903 Reply

    Unsure. There are two $file->getUid() calls later on, and I guess these need to be made on the FileReference object and not the originalFile one?!
  5. Mathias Brodala commented on patch set 1 09/19/24, 08:12

    ContentObjectRenderer.php:903 Reply

    Right, the showpic thingy needs to refer to the processed file.
  6. Mathias Brodala voted on patch set 1 CR +1 09/19/24, 08:36

  7. Franz Holzinger voted on patch set 1 V +1 09/21/24, 19:29

  8. Benni Mack updated the commit message in patch set 2 CR +1 V +1 10/18/24, 13:54

  9. Benni Mack voted on patch set 2 CR +1 V +1 10/18/24, 13:54

  10. Garvin Hicking updated the commit message in patch set 3 CR +1 V +1 10/18/24, 16:56

  11. Garvin Hicking rebased onto patch set 4 10/18/24, 16:57

  12. Franz Holzinger voted on patch set 4 CR +1 10/22/24, 16:23

  13. Franz Holzinger voted on patch set 4 V +1 10/22/24, 16:24

  14. Benni Mack voted on patch set 4 CR +1 V +1 10/23/24, 15:40

  15. Garvin Hicking voted on patch set 4 CR +2 V +2 10/23/24, 16:44

  16. Garvin Hicking merged patch set 5 10/23/24, 17:20