Review main Merged

89200[BUGFIX] Make sure absolute paths are cache busted

Simon Praetorius CR +2 V +2 Easy +42 −4 updated 04/24/25, 10:35

Commit message

The patch for #105691 introduced a regression to cache busting of asset
files in the frontend due to a missing test case. Before that patch, if
absolute file system paths like:

"/var/www/html/myproject/public/_assets/hash/myfile.css"

were passed to the `AssetRenderer` (and other APIs using
`GeneralUtility::createVersionNumberedFilename()`), they properly
received a cache busting parameter. After the change, the parameter
wasn't applied anymore.

This patch adds a test case for absolute asset paths in frontend
context and adds a `file_exists()` check to the method to differentiate
absolute file system paths properly and to prevent the function from
"invalidating" them by prepending the TYPO3 path to them.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Stefan Bürk +1
  • Verified V +2 Done
    • Benni Mack +2
    • Oliver Klee +1
    • Stefan Bürk +1
    • core-ci +1 CI

Issues 3

Files 2

Review log 912

  1. Simon Praetorius uploaded patch set 1 04/23/25, 09:25

  2. core-ci voted on patch set 1 V +1 04/23/25, 09:31 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/78057

  3. Simon Praetorius uploaded patch set 2 V +1 04/23/25, 14:37

  4. Simon Praetorius updated the commit message in patch set 3 04/23/25, 14:39

  5. Simon Praetorius marked it ready for review 04/23/25, 14:40

  6. core-ci voted on patch set 2 V +1 04/23/25, 14:44 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/78068

  7. core-ci voted on patch set 3 V +1 04/23/25, 14:46 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/78069

  8. Benni Mack voted on patch set 3 CR +1 V +1 04/24/25, 07:53

  9. Oliver Klee voted on patch set 3 V +1 04/24/25, 08:15

  10. Stefan Bürk voted on patch set 3 CR +1 V +1 04/24/25, 10:25

  11. Benni Mack voted on patch set 3 CR +2 V +2 04/24/25, 10:35

  12. Benni Mack merged patch set 4 04/24/25, 10:35