@eramirezprotec opened this Issue on June 4th 2018 Contributor

Hi. I'm having some issues with the $_COOKIE variable. If I add this line of code error_log("COOKIES: ".json_encode($_COOKIE)); at the beginning of the piwik.php file, I can see the cookies the client is sending to the server. But after some processing, the $_COOKIE variable gets emptied. For example, if I put the same line of code (error_log("COOKIES: ".json_encode($_COOKIE));) within the code of the isExcluded method of the VisitExcluded class, I get an empty array. At some point, Matomo is reassigning the value of the $_COOKIE variable and that's preventing me from using features like Do Not Track.

I'm not sure if it happens because of some configuration on my server. I already checked the Apache and Redis configuration and I can't find anything that could trigger this strange behavior.

Have you ever faced an issue like this? This is happening with version 3.2.0, but I have a development environment that should be an "exact copy" and this issue is not happening there.

The only lines of code that I could find that modify the value of the $_COOKIE variable are these:

1 - $_COOKIE = isset($env['cookie']) ? $env['cookie'] : array(); // Located within the resetEnvironment method of the RequestSet class.
2 - unset($_COOKIE[$this->name]); //Located within the loadContentFromCookie of the Cookie class.

It seems that the first option is the one modifying the variable value. But why?

@eramirezprotec commented on June 20th 2018 Contributor

Updating QueuedTracking plugin to version 3.2.1 solved the issue.

Powered by GitHub Issue Mirror