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
Make the opt out work when a PHP 32 bit is used #18019
Comments
Just a wild guess: |
The Matomo is used on a subdomain of the main domain.
In Matomo I deactivated tracking with cookies maybe that's also an important information. |
Is there any chance you could post a URL to the page where we can reproduce this? It be otherwise hard to reproduce or guess what the problem might be @samuel-lobby |
@tsteur sure, here is the link to the privacy policy: https://www.hs-doepfer.de/datenschutz |
It was trying to set an ignore cookie but it wasn't set afterwards somehow. Nothing related in the logs, no issues. Not sure what the problem might be. @samuel-lobby I think you might not be using the latest version of Matomo? Is there any chance you could upgrade to see if that fixes it maybe? |
@tsteur I use Matomo 4.4.1. I made the update to this version after I recognized that this opt out iframe isn't working as it should. So maybe the cookie matomo_ignore is blocked from the cookie consent mananger? |
@tsteur After checking myself, I noticed the reason why the cookie isn't set: The expiration date is |
@Findus23 you're right. Why is this happening? Can I control this expiration date? |
Matomo sets the expiration date to 30 years from now: matomo/core/Tracker/IgnoreCookie.php Line 59 in fd1d68c
So for a starter you could check the output of this PHP script: <?php
var_dump(time());
var_dump(time() + (86400 * 365 * 30)); |
But it is most likely a 32 bit overflow somewhere: So can you describe your server setup a bit more? Which operating system are you using? Which PHP version? |
@Findus23 |
I suppose this means we might also need to change other places? If I see this right the only thing we maybe can do about this add a system check mentioning 64 bit system / PHP required? We could possibly make it work for this particular case to generate a date in 30+ years using something like But generally there might be other places where there are also issues? |
@tsteur what can I do in the meantime? Or do I have to wait until it's released with an update of matomo? |
@samuel-lobby is there any chance you can ask your hoster if they can update your site to a 64 bit system? To fix this specific issue maybe we can refactor the opt out cookie to calculate 30 years in the future differently instead of using a timestamp etc use something like this (pseudo code) |
The goal of this issue is to make the opt out work when a PHP 32 bit is used see #18019 (comment) |
Hello all,
The iframe I added for the opt out works fine, at least as far as tracking is concerned. If I click on the checkbox it is unchecked and the text of the iframe changes after a reload of the page. If I reload the page again, the "old" text is displayed plus the checkbox is checked again.
However, the cookie for the opt out is set correctly and also works correctly.
But I would like the checkbox and the text to remain after an opt out. Do I have to set anything extra for this or is this a bug?
Thank's a lot and best regards,
Samuel
The text was updated successfully, but these errors were encountered: