Skip to content

Fix lazy Twig mode dropping the path for absolute image URLs#1655

Open
Atesca wants to merge 1 commit into
liip:2.xfrom
Atesca:bugfix-1447-lazy-absolute-url
Open

Fix lazy Twig mode dropping the path for absolute image URLs#1655
Atesca wants to merge 1 commit into
liip:2.xfrom
Atesca:bugfix-1447-lazy-absolute-url

Conversation

@Atesca

@Atesca Atesca commented Jul 11, 2026

Copy link
Copy Markdown
Q A
Branch? 2.x
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Fixed tickets #1447
License MIT
Doc n/a

Fixes #1447.

In lazy Twig mode, absolute image URLs (S3/Flysystem/VichUploader) break:
the full URL is passed to the CacheManager unchanged. Legacy mode always
ran parse_url($path, PHP_URL_PATH) first; LazyFilterRuntime dropped it
(commit 13a32e4).

This restores that normalization in cleanPath() — covering both filter()
and filterCache() — but only when the path has a host, so local filenames
containing ? or # are left untouched.

A reproducing test case is included: the new absolute url cases fail
without the fix and pass with it, while existing cases stay green.

In lazy mode, absolute image URLs (S3/Flysystem/VichUploader) were passed
to the CacheManager unchanged, breaking cache resolution. Legacy mode
always ran parse_url($path, PHP_URL_PATH) first; LazyFilterRuntime dropped
it (commit 13a32e4).

Restore that normalization in cleanPath() (covers filter() and
filterCache()), but only when the path has a host, so local filenames
containing "?" or "#" are left untouched.

Fixes liip#1447
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Set Twig mode to lazy makes it no longer work

1 participant