Review 13.4 Merged

89216[BUGFIX] Make sure absolute paths are cache busted

Benni Mack CR +2 V +2 Easy +42 −4 updated 04/24/25, 10:58

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
  • Verified V +2 Done
    • Benni Mack +2
    • core-ci +1 CI

Issues 3

Files 2

Review log 34

  1. Benni Mack commented on patch set 1 04/24/25, 10:35

    Cherry Picked from branch main.
  2. core-ci voted on patch set 1 V +1 04/24/25, 10:44 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/78111

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

  4. Benni Mack merged patch set 2 04/24/25, 10:58