-
Notifications
You must be signed in to change notification settings - Fork 667
[4.x]: Css and JS not loading if we use {% cahe %} #17182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I see your |
And where are you loading your JS and CSS? |
that was typo. there is I tried plugin's auto load assets feature as well as tried loading them manually like this.
I notice that if i use cache tag to whole html, asset bundles do not loads. as soon as i use |
I’m not able to reproduce that. I installed the GDPR Cookie Consent plugin on a Craft 4.15.2 install, created a template identical to your example, and an <!DOCTYPE html>
<html class="h-full" lang="en">
<head>
<link href="[https://craft4.ddev.site/cpresources/80ddea83/style.css?v=1745864916](view-source:https://craft4.ddev.site/cpresources/80ddea83/style.css?v=1745864916)" rel="stylesheet"></head>
<body class="min-h-full h-auto text-base font-sans">
<script src="[https://craft4.ddev.site/cpresources/80ddea83/script.js?v=1745864916](view-source:https://craft4.ddev.site/cpresources/80ddea83/script.js?v=1745864916)"></script></body>
</html> I also added a |
What happened?
Description
I have a code like this
it needed to load assets but it doesnt. if i turn off cache from config/general.php or remove
{% cache %}
code from template, assets do load.Happens in latest version of craft cms v4.15.2
Craft CMS version
4.15.2
PHP version
8.2
Operating system and version
MacOs 15.1.1 (24B91)
Database type and version
mysql Ver 8.0.40 for macos15.1 on arm64 (Homebrew)
Image driver and version
No response
Installed plugins and versions
No response
The text was updated successfully, but these errors were encountered: