-
Notifications
You must be signed in to change notification settings - Fork 6
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
[Craft 4] Error when accepting cookies on iOS devices #116
Comments
@jellingsen some more info on this one, since it happens on desktop as well. I can then browse the site without constantly getting the popup, but when I do open the popup, and I try to save any setting, it doesn't seem to save anything. The page gets reloaded, I can see the consents in the admin, but when re-opening the popup, nothing is checked. |
Thank you for the additional information, @JulieVelghe. I'll try to reproduce now, and see what I can find. |
Do you get a CORS-error in the network tab in developer tools when this happens? |
@jellingsen I did get one, but I've adjusted my htaccess file and no longer get that cors error, but the cookie issues remains. my htaccess is like this:
I did notice, when I change my cookie preferences on the main site, and than go to another page and check them again, the changes remain. So apart from that 'true'-bug, the cookie preferences seem to be saved on the main site. |
@JulieVelghe is this a localhost-issue, or do you experience it on production as well? The only way I'm able to reproduce what you are explaining is hen the site is opened with http and posts to https and thus gets a CORS-error. @ebarbe-globalia I'm unfortunatly unable to reproduce locally on my iPhone 14 with ddev over the local network. Could you point me to the site that you experience this so I can have a look at it directly? |
Hi @jellingsen , I'm having the issue on local and on the staging and production as well. |
hi @jellingsen , So thats a setup with craft 4.13.9 and cookie consent 4.0.4, and the extra after-body-start hook and Header set Access-Control-Allow-Headers * and https. I've just looked at my production, setup there is also https, craft 4.13.9, cookie consent 4.0.4, but there I don't have the the body start hook, headers in htaccess aren't adjusted and I haven't yet invalidated the consents there. I think the 'true'-bug only happens the one time when you freshly activate the cookie consent for a site. |
Hi @JulieVelghe |
@jellingsen for some more comparisons, we have another site, [https://ilvo.vlaanderen](https://ilvo.vlaanderen.be/](https://ilvo.vlaanderen.be/en), where we also have the cookie consent 4.0.4, but an older craft (4.12.8), there everything still works fine. |
@jellingsen how can I check that behaviour? when I look in the cookies, I can see the CraftSessionId cookie for the subsite: Where do I check the ajax endpoint exactly? |
@jellingsen , I can confirm the behaviour. Below some screenshots: request cookies from main site: Subsite doesn't seem to have any request cookies at all: headers on the subsite (indeed missing the craft session id): |
Yeah, ofcourse its not sending the cookies - its sending the request to another domain, the main site.. It must send it to the subsite.. |
@jellingsen this is not something that we can fix, but has to be fixed by you then? |
@jellingsen We are experiencing this issue with https://www.jsheld.com/ |
hello @jellingsen , any news on a possible fix for this issue? |
Problem:
When clicking on
Accept All
on iOS devices, the page is redirected to the action url for cookie consent, and just the stringtrue
is displayed. The form seems to be submitted onto the same page instead of using an ajax request.Steps to reproduce:
{% hook 'after-body-start' %}
to your template.Load plugin default JS assets.
on plugin configuration.Accept All
Page displays a
true
string instead of the current template.Version details:
The text was updated successfully, but these errors were encountered: