Review 12.4 Merged

86330[BUGFIX] Fix ResourceFactory EXT: resolution in subfolder & composer-mode

Benjamin Franzke CR +2 V +2 Easy +3 −1 updated 10/07/24, 10:10

Commit message

Using `<f:image src="EXT:example/Resources/Public/Images/test.svg" />`
to include an image in a symlinked composer mode installation failed
with:
    'Unable to render image tag in "pages:123": File
     /symlink/_assets/abcdef0[…]/Images/test.svg does not exist.'

The file exists and is directly accessible via:
https://example.org/symlink/_assets/abcdef0[…]/Images/test.svg

Files referenced by `EXT:` are internally resolved using the fallback
storage 0. To successfully resolve the file path TYPO3 must internally
use the relative instance path starting with `_assets`:
    `_assets/abcdef0[…]/Images/test.svg`

instead of the full request path starting with `subfolder/_assets`:
    `subfolder/_assets/abcdef0[…]/Images/test.svg`

Symlinks are typically used when having TYPO3 installed or linked
in a subfolder of the web server. This issue also occurs in TYPO3
v11 with composer-mode and using typo3/cms-composer-installers:^4

Review

  • Code review CR +2 Done
    • Benjamin Franzke +2
  • Verified V +2 Done
    • Benjamin Franzke +2
    • core-ci +1 CI

Issues 1

Files 1

Review log 45

  1. Benjamin Franzke commented on patch set 1 10/07/24, 06:24

    Cherry Picked from branch main.
  2. Benjamin Franzke commented on patch set 1 CR -2 10/07/24, 06:29

    delaying for now
  3. core-ci voted on patch set 1 V +1 10/07/24, 06:40 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/67204

  4. Benjamin Franzke voted on patch set 1 CR +2 V +2 10/07/24, 10:10

  5. Benjamin Franzke merged patch set 2 10/07/24, 10:10