Skip to content
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

Trunk: delete the piwik_ignore cookie via UI doesn't work #1982

Closed
mattab opened this issue Jan 7, 2011 · 14 comments
Closed

Trunk: delete the piwik_ignore cookie via UI doesn't work #1982

mattab opened this issue Jan 7, 2011 · 14 comments
Assignees
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Milestone

Comments

@mattab
Copy link
Member

mattab commented Jan 7, 2011

on FF and Chrome at least, setting the cookie works, but deleting doesn't work. I looked but didn't see the solution (Piwik_Tracker_Cookie::setIgnoreCookie goes through ->delete() so not sure what is not working?)

@robocoder
Copy link
Contributor

I'll take a look. It was working for me in FF when it was a separate plugin.

@mattab
Copy link
Member Author

mattab commented Jan 10, 2011

Using User Settings > Ignore Cookie, I can create but not delete the cookie.

Using ?module=CoreAdminHome&action=optOut I can opt out, opt in, then I can't opt out again (it just refreshes the page) with "You are currently opted in" message before/after.

The cookie is Name piwik_ignore
Value ignore%3DIioi%3A_%3D0120407fee2b696a29ce01e66e78aedfbd6a8ff6

@robocoder
Copy link
Contributor

I think you're running into the "resend form?" problem because the browser thinks you're trying to re-POST.

Not sure what browser setting controls this, but I toggled it a dozen times.

What happens if you add this to optOut.tpl?

    <input type="hidden" name="fuzz" value="<?php echo time(); ?>"></input>

@mattab
Copy link
Member Author

mattab commented Jan 10, 2011

adding the line doesnt fix it

I cant remove the cookie also using the ' Click here to delete the cookie and have Piwik track your visits' link in Settings>User settings, which was working before (is it working for you?)

@robocoder
Copy link
Contributor

(In [3692]) refs #1982 - Smarty default is to passthrough php tag as plain text; use built-in smarty.now

@robocoder
Copy link
Contributor

Both UserSettings.setIgnoreCookie and CoreAdminHome.optOut worked for me.

See if [3692] helps in your case using optOut. I'm not sure about UserSettings. The only difference is that it's a GET, and there's a Location: (redirect) and Set-Cookie: in the response.

@robocoder
Copy link
Contributor

(In [3815]) refs #1982 - delete() should use setCookie() instead of setcookie(), and pass path + domain.

@robocoder
Copy link
Contributor

(In [3816]) refs #1919, refs #1929, refs #1982 - delete tracking cookie when opting out (i.e., ignore cookie is set)

@robocoder
Copy link
Contributor

matt: please svn up and test

@mattab
Copy link
Member Author

mattab commented Feb 5, 2011

I tried, when I click delete the ignore cookie, I see the http response:

Set-Cookie piwik_ignore=deleted; expires=Fri, 05-Feb-2010 00:11:09 GMT

but then the following request still has the cookie.
Cookie piwik_ignore=ignore%3DczoxOiIqIjs%3D%3A_%3D4b2ba04c6d8dccd6ff3b7837ab9278af4db04af4

I have the same problem with optout feature.

@robocoder
Copy link
Contributor

Replying to matt:

I tried, when I click delete the ignore cookie, I see the http response:

Set-Cookie piwik_ignore=deleted; expires=Fri, 05-Feb-2010 00:11:09 GMT

I'm pretty sure that's the old code calling the built-in setcookie() function. Maybe there was a merge conflict with Cookie.php?

but then the following request still has the cookie.
Cookie piwik_ignore=ignore%3DczoxOiIqIjs%3D%3A_%3D4b2ba04c6d8dccd6ff3b7837ab9278af4db04af4

I have the same problem with optout feature.

Another possibility is duplicate cookies in your browser. Did you previously install Piwik in a parent directory? (Cookies are uniquely identified by the tuple, (name, domain, path).

@robocoder
Copy link
Contributor

(In [3853]) refs #1982 - when deleting cookie, mimic the built-in function

php/ext/standard/head.c has this comment:

  • MSIE doesn't delete a cookie when you set it to a null value so in order to force cookies to be deleted, even on MSIE, we pick an expiry date 1 year and 1 second in the past

@robocoder
Copy link
Contributor

Delete the cookies manually in your browser and svn up. The http response in comment:11 shows that your working copy doesn't have the change from [3815].

@mattab
Copy link
Member Author

mattab commented Feb 8, 2011

OK Anthon you were right, my merge/update didn't complete for some reasons. Now all is working, great news.

@mattab mattab added this to the Piwik 1.2 milestone Jul 8, 2014
@mattab mattab self-assigned this Jul 8, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Projects
None yet
Development

No branches or pull requests

2 participants