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
http_cache not working #1246
Comments
I've encountered the same. |
/cc @Toflar |
Can you test with 4.4.8 or does "with 4.4.6 it still worked" mean, that's the last one it worked with? |
just tested: |
Ok, I'll let you find out if 4.4.7 works then. |
well, updating from a Contao 4.4.4 version to 4.4.7 specifically failed using contao manager oO. Without beeing able to install specific version with contao manager, I cant test right now. |
Okay after an hour of debugging, I found the issue. It was introduced by @aschempp in cae98ce#diff-6c590ef7e538a1f4a9115824540acb51. In my case, the There's certainly some kind of bug in Symfony because when merging the |
It's wrong that |
It's not by default, it's set during the preflight request. For whatever reason. Nobody uses |
Thanks for investigating. This covers my observations and I ended up quite confused 😄 |
Doesn‘t our Template::getResponse method set everything to private if it‘s not public? |
I cannot reproduce the issue on contao.org: bin/console cache:clear
find var/cache/prod/http_cache -type f | wc -l
0 One minute later: find var/cache/prod/http_cache -type f | wc -l
20 |
As I said, it happens during the process of merging http headers. @leofeyer what stack do you use on contao.org? |
Ubuntu, Nginx and PHP-FPM with PHP 7.1. |
same stack here, but with that error. |
I'm not using the managed edition on contao.org. Maybe that makes the difference? |
I don't use the managed edition either, but still get the wrong behaviour. |
I think I‘ve found the issue. I‘d like to investigate a bit more on the reasons before I work on a solution. Will report back. |
Can you guys check your |
$ php -i | grep cache_limiter
761:session.cache_limiter => nocache => nocache |
Probably related: symfony/symfony-docs#8784 |
Okay, so here's the summary of a day of debugging and investigation: Why does the issue suddenly appear?Normally, when you call What effect does it have on Contao?As of now, everytime you work with the session. A response turns So what now?The correct solution would be to never work with the session if you don't need it. If nobody accesses the session of Symfony, the session is never started and thus that issue would not occur. So you see, it all comes down to this: In Contao, a session never implied a So can we just restore the old behavior?No. We should not adjust a Symfony-wide configuration. We could adjust the What would be the right solution?Stop using
Not sure if this would work out but maybe worth a try. I just don't feel very comfortable just adjusting the listener and ignoring further issues. |
also: session.cache_limiter => nocache |
So providing a BC layer for |
This will only change in Contao 4.5. |
It's a bugfix that we can merge into 4.4, it doesn't change anything. |
Did not adjust tests yet but can you check if that fixes the issue? |
Can you also check if the autologin functionality works for you? terminal42/header-replay-bundle#8 is the reason why 4.4.13 requires header-replay-bundle 1.3 but it works for me with all 1.4.* versions so there's no reason to me to stick with the old version :) |
@Toflar works, no problem so far with Contao 4.4.13 and |
@Toflar freue mich auf den Kaffee... :) |
@joeherold @Toflar Ich spendier euch beiden den Kaffee… Meldet euch einfach in Salzburg bei mir (Christian von der Contao Academy) |
Thanks for all the work on all the different tasks. After updating it is still not working. I updated with Contao Manager to Contao v4.4.14 and Symphony v3.4.4. Did I miss anything?
|
While I was hoping for a contao built in solution, pagecacheenabler-bundle workes for me. I would still like to know, what the status of this issue is? Is there any other open issue I should follow, to keep updated on this? Maybe something on the Symphony side? |
The issue is still open so why should it be fixed? There are a few fixes needed, they are all mentioned here: #1389 |
@Toflar great thanks! |
The issue has eventually been fixed in Contao 4.4.15 and Contao 4.5.5. |
Hello, I am on a 4.5.6 version of contao. Do you have an idea of the problem ? thank you in advance |
Are you talking about the client (your browser) or the reverse proxy cache ( |
client (your browser) |
Yeah, this is a Symfony bug, unrelated to Contao and still not fixed. We're working on fixing this together with other Symfony devs: symfony/symfony#26532 |
Ah OK ! Thank you for that answer. I will wait a bit ... ;-) Thank you |
Hello, Is there a way around the problem while waiting for the fix? Thank you |
Unfortunately, there's none. |
Hello, Thank you |
@iGweb Cloudflare free plan caches for 2h on client side. Cloudflare below enterprise plan does not distinguish between browser user agents, like contao does. |
ok thanks for these precision :-) |
Actually, Contao should allow you to bypass the local cache and still use the site configuration. See contao/manager-bundle#62 |
Hello, I have the same problem on one of my website: https://www.jalmalv85.fr To be able to access the site in HTTPS version I have to comment the following line in the file web/app.php: Is a problem? Thank you |
The only problem is that the file will be overwritten on a Contao update. But contao/manager-bundle#71 has been merged so this feature will be available in Contao 4.6 |
Ok Thank you |
Description ----------- Fixes #1243 Commits ------- 3ded076e Fix possible null value 60836e49 Also check for null on json_decode
after updating to 4.4.9 var/cache/prod/http_cache stopped working.
with 4.4.6 it still worked.
"Systemwartung" say 0 cached files and the folder http_cache stays empty.
tested in multiple websites, but same server.
The text was updated successfully, but these errors were encountered: