Closed samuelreichor closed 17 hours ago
Thanks for the report. In Discord I sent you https://github.com/putyourlightson/craft-blitz/commit/0da5186d69cca474a0ef0c05faaee8a48566943d, which addresses this. Did you clear the cache and retest?
Yes I also deleted vendor and made a fresh new install. I flushed and deleted the cache.
Ok, I'll troubleshoot and let you know what I find.
The latest commit is working for me locally. Please ensure you’re using the latest version of the code, clear and flush the cache, and retest. If the issue persists, describe the steps you took in testing in detail so I can follow them.
I tested everything again, but unfortunately, it’s still not working for me.
Double-checked all settings: I confirmed that all settings are configured correctly.
Cleared the cache using the utilities in Craft CMS.
Flushed the cache again through Craft’s utilities.
Updated putyourlightson/craft-blitz
to this version:
"putyourlightson/craft-blitz": "4.x-dev#0da5186d69cca474a0ef0c05faaee8a48566943d",
Verified the plugin update in the vendor
folder by comparing it with the latest changes in Git – everything appears correct.
Checked caching for /studienangebot?fCampus=hagenberg&fTitle=bachelor
: This page is served by blitz.
Checked caching for /studienangebot
: This page is served by blitz. (But the cached Page is wrong because of ?fCampus=hagenberg&fTitle=bachelor
from the first hit)
(And I tested inENVIRONMENT=production
)
- Checked caching for /studienangebot?fCampus=hagenberg&fTitle=bachelor: This page is served by blitz.
“Served by Blitz” doesn’t mean that the page was cached by Blitz. How are you verifying whether the page is cached?
Sorry, that was not expressed correctly. I see two comments from Blitz which shows that it is served and cached by blitz
Thanks, I was able to replicate the issue by matching your “Included Query String Parameters”. Can you please retest with the commit https://github.com/putyourlightson/craft-blitz/commit/b65c92e90430951c9b5cf11cfce24c0b45e0a06b?
Ah, dang it, now the usual URI include patterns are broken. 🙈
I tested it as before, cleared and flushed the cache, but now all the 'normal' include URI patterns are being ignored. Strangely enough, the homepage is still working fine.
Here's what's showing up in the logs in debug mode:
[2024-11-07 14:40:09] Page not cached because it does not match an included URI pattern. [https://fhooe.ddev.site/studienangebot?fCampus=hagenberg&fTitle=bachelor]
[2024-11-07 14:41:27] Page not cached because it does not match an included URI pattern. [https://fhooe.ddev.site/studienangebot]
[2024-11-07 14:41:39] Page not cached because it does not match an included URI pattern. [https://fhooe.ddev.site/campus-hagenberg]
Indeed. This should hopefully be the final fix https://github.com/putyourlightson/craft-blitz/commit/c05b92117b57d8b6b70f2358cabdabd6778b35a5.
Yessss! that works now, thank you! :)
Great, I’ll be releasing this today or tomorrow. Thanks for reporting this and for sticking with me getting through it.
Bug Report
I want to disable caching for pages with query parameters, but it doesn't seem to work as expected.
Here are the settings I've configured (which I believe should be correct):
Query String Caching: Do not cache URLs with query strings
Interestingly, if I change the settings as follows:
Query String Caching: Do not cache URLs with query strings
In debug mode, I receive the message: Page not cached because it does not match an included URI pattern. /studienangebot?fTitle=bachelor
I’ve tried investigating further and it seems like there might be an issue with how CacheRequestService.php is handling this logic, though this is just a guess. You'd certainly have a better understanding of how this should behave.
Here’s what seem strange to me:
Diagnostics Report
Application Info
Installed Plugins
Loaded Modules
Blitz Plugin Settings
Recommendations
Site Tracking [1]
Site Tracking [2]
Site Tracking [3]
Site Tracking [4]