codefog / contao-cookiebar

Display the information about cookies on your Contao website
MIT License
26 stars 9 forks source link

Contao 4.4.x: Cache #38

Closed derastronaut closed 6 years ago

derastronaut commented 6 years ago

Hello Kamil,

as you may be know the cache in Contao 4.4.7+ is broken, because of an error in Symfony. Now, Johannes Pichler (https://packagist.org/packages/pliigo/pagecacheenabler-bundle) wrote an extension which fixes that issue but Cookiebar is being cachet too. I know there was the same problem in Contao 3.x some time ago and you fixed it. Now, in Contao 4 (I am using 4.4.13) the issue is back again. I can push the "accept"-button as many times I want but on some (cached) pages the Cookiebar still shows up.

Greetings Sebastian

qzminski commented 6 years ago

This should be fixed in #34. Are you using the latest version of the extension?

If it's still broken then probably all Contao insert tags are affected...

derastronaut commented 6 years ago

I have version 1.4.0 installed from 26.01.2018.

joeherold commented 6 years ago

@derastronaut it is not an error of symfony... :)

qzminski commented 6 years ago

@derastronaut can you check if other insert tags are working fine with cache? For example {{date}}.

derastronaut commented 6 years ago

Yes, {{date}} is working.

joeherold commented 6 years ago

@derastronaut I changed the behaviour in the cache fix for insert-tags using uncached flag. updated to version 1.1.5 https://packagist.org/packages/pliigo/pagecacheenabler-bundle

qzminski commented 6 years ago

@derastronaut can you check the solution proposed by @joeherold ? The cookiebar will be rewritten to be JS-only in version 2.0 – see #36, so maybe it's better to release that instead of fixing this issue over and over...

joeherold commented 6 years ago

@qzminski it was my fault, because in my quick fix, the |uncached was cached as well :)

qzminski commented 6 years ago

I know, yet the cookiebar concept is still wrong as it should be JS-only 😉

joeherold commented 6 years ago

LOL, thats why I am using: https://cookieconsent.insites.com/

derastronaut commented 6 years ago

Now the Cookiebar disappears by hitting "command+r". I do not push the "accept"-button. I tried it in Firefox and Safari.

joeherold commented 6 years ago

did you clear the cache?

joeherold commented 6 years ago

and clear the cookies you already have?

derastronaut commented 6 years ago

Yes

joeherold commented 6 years ago

ok, but that seems to be something different. the inserttag is now not cached anymore

derastronaut commented 6 years ago

Yes to both.

joeherold commented 6 years ago

if this issue is according to my quickfix, which works for me, you may force symfony/symfony to version 3.4.3 in your composer.json of your website and do update all your packages in symfony 3.4.3 the session thing was not present

joeherold commented 6 years ago

@qzminski @derastronaut Issue should be closed, because it is not related to this extension

derastronaut commented 6 years ago

Ok, thanks for the hint with Symfony. But I'll give Cookie Consent a try until Cookiebar 2.0 is released :)

qzminski commented 6 years ago

Thanks for investigating this! Any ideas if there is a Cookie Consent extension for Contao 4?

derastronaut commented 6 years ago

I guess this could it be: https://packagist.org/packages/trilobit-gmbh/contao-cookiebar-bundle ?

In https://github.com/trilobit-gmbh/contao-cookiebar-bundle/tree/master/src/Resources/public/assets/src there is a cookieconsent.js. But I didn't tried this extension yet.

qzminski commented 6 years ago

Thanks, I may consider switching to cookieconsent.js in version 2 as well.