- Issue created by @7r3y
- πΊπΈUnited States mradcliffe USA
Thank you for creating the issue. I'll try to resolve this week.
- πΊπΈUnited States mradcliffe USA
I mentioned I was going to be able to get to this a couple of weeks ago, but unfortunately I got caught up. I apologize for not addressing it. I will try to review this week.
- πΊπΈUnited States mradcliffe USA
I have been trying to debug this and find a way to reproduce locally. On a fresh install, agreement with anonymous works fine and no session cookie is used.
I tried manually setting a session cookie created for an anonymous user and agreeing to the agreement. I navigated around a couple of times. Then I deleted the session cookie and navigated to a node, and since the agreement cookie was still active, then it did not redirect to the agreement page.
I also tried manually setting a session cookie (in code) for the anonymous user after refreshing cache, agreeing to the agreement after I navigated to a node, then deleted the session cookie, refreshed cache, tried to visit the node, and since the agreement cookie was still active, it did not redirect to the agreement page.
So I think I need more steps to reproduce.
A simple workaround in the meantime is to grant the "revoke own agreement" to the anonymous user, which will display the checkbox and button on the agreement form.
Trying to think about it some more, maybe when checking if hasAnonymousUserAgreed, if the user has a session cookie, then migrate their session so it gets an updated date. If the cookie is gone, then it won't update the session cookie.
A simple workaround in the meantime is to grant the "revoke own agreement" to the anonymous user, which will display the checkbox and button on the agreement form.
The workaround works. Thanks!