#107100page.cssInline has to be cached
Description
Having the following code I get the desired result:
page.headerData {
10 = USER_INT
10 {
stdWrap {
wrap = .header{background: url('|') 0 0 no-repeat}
outerWrap = <style>|</style>
}
userFunc = Vendor\Extension\Service\ImageService->getRandomFilePath
userFunc {
directory = 1:/banners
}
}
}
Using the same code with page.cssInline { ... } (without the outerWrap)is not possible as the markers like
<!--INT_SCRIPT.d6aeb8678ee6f63117e8806ed1ae368f-->are not replaced.
My expectation is that page.cssInline should be able to return the results of USER_INT like page.headerData does.
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
History 3
-
David Bruchmann changed description <span data-processor="relativetime" data-value="2025-07-15T12:01:33+00:00" > 07/15/25, 12:01 </span>
-
David Bruchmann changed description <span data-processor="relativetime" data-value="2025-07-15T12:04:14+00:00" > 07/15/25, 12:04 </span>
-
Oliver Bartsch commented and changed status
NewClosed <span data-processor="relativetime" data-value="2026-11-16T21:27:17+00:00" > 11/16/26, 21:27 </span>
Hey,
thanks for the detailed report.
This is caused by
config.inlineStyle2TempFile, which is enabled by default. With that setting, the result ofpage.cssInlineis not printed into the HTML. It is written to a static CSS file intypo3temp/assets/css/and linked from the page. The<!--INT_SCRIPT...-->placeholder of your USER_INT therefore ends up inside that file. TYPO3 only replaces these placeholders in the HTML document, never in files that the web server delivers directly.page.headerDataworks because its content is always part of the HTML.To get uncached content in
cssInline, disable the temp file:The CSS is then rendered as an inline
<style>block in the page, and the USER_INT placeholder is replaced the same way as inheaderData. Your currentheaderDatasetup is also fine, and probably the clearer choice for a per-request background image.A static file cannot contain per-request content, so this works as designed, and I’ll close the issue. If you think the core should switch to inline output automatically when uncached content is detected, please open a feature request.
Cheers, Oli