#109469Broken relative URLs in inline CSS after removal of `getStreamlinedFileName()`
Description
When using PageRenderer::createCssTag() with the inline option enabled, relative URLs inside CSS files are incorrectly rewritten. PageRenderer::createInlineCssTagFromFile() calls fixRelativeUrlPaths() with the absolute file path as the base path. This causes fixRelativeUrlPaths() to treat the file as a directory when resolving relative URIs, resulting in incorrect absolute server paths being embedded in the CSS output.
Steps to Reproduce
1. Add a CSS file in an extension:
EXT:my_ext/Resources/Public/Css/style.css
2. Add a relative asset reference inside the CSS:
@font-face {
font-family: 'MyFont';
src: url('../Fonts/font.woff2') format('woff2');
}
3. Include the CSS via `PageRenderer` with inline enabled:
$pageRenderer->addCssFile(
'EXT:my_ext/Resources/Public/Css/style.css',
'stylesheet',
'all',
'',
true // inline = true
);
4. Render the frontend output
Actual Behavior
The relative URL inside the CSS is rewritten to a filesystem path (starts with double slashes):
//var/www/html/vendor/myvendor/my-ext/Resources/Public/Fonts/font.woff2
This results in broken asset loading in the browser.
Expected Behavior
Relative URLs should be resolved based on the public URI of the CSS file and rewritten to a correct public path such as:
/_assets/<hash>/Fonts/font.woff2Reviews 1
History 48
-
Garvin Hicking changed category Is Regression 1 <span data-processor="relativetime" data-value="2026-04-02T16:37:47+00:00" > 04/02/26, 16:37 </span>
-
Garvin Hicking changed status
NewAccepted <span data-processor="relativetime" data-value="2026-04-06T16:39:02+00:00" > 04/06/26, 16:39 </span> -
Gerrit Code Review pushed patch set 1 for main to change 93626 status
AcceptedUnder Review <span data-processor="relativetime" data-value="2026-04-11T12:53:23+00:00" > 04/11/26, 12:53 </span> -
Gerrit Code Review pushed patch set 2 for main to change 93626 <span data-processor="relativetime" data-value="2026-04-11T12:57:48+00:00" > 04/11/26, 12:57 </span>
-
Gerrit Code Review pushed patch set 3 for main to change 93626 <span data-processor="relativetime" data-value="2026-04-11T13:01:54+00:00" > 04/11/26, 13:01 </span>
-
Gerrit Code Review pushed patch set 4 for main to change 93626 <span data-processor="relativetime" data-value="2026-04-11T13:14:12+00:00" > 04/11/26, 13:14 </span>
-
Helmut Hummel commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2026-04-12T14:45:09+00:00" > 04/12/26, 14:45 </span> -
Benni Mack changed status
ResolvedClosed <span data-processor="relativetime" data-value="2026-04-21T11:30:33+00:00" > 04/21/26, 11:30 </span>
Applied in changeset commit:14ae5c7e6d6d1fcdf6304b2dc64c6528c3b80d37.