We have a flag that can be set on certain content, for either anonymous or authenticated users. It's working for authenticated users, but not for anons.

Here's what the developer says about this:

> I've been looking at the anon user flagging issue, the 'Select' option doesn't work if you are not logged in.
>
> It's not the permissions, what I discovered is that Drupal actually flags the node, but the Session ID(stored as a cookie) keeps changing on every page load if you are anonymous, so the system treats you as a new visitor on every load and doesn't show you the previous flaggings you did.. Do you have any idea why that could be?
>
> I have a feeling it has something to do with the server setup(Php settings or maybe the virtual host..) because for me locally everything works and the session ID stays the same thru page loads even in incognito mode.

Does anyone have any ideas what server settings might be different, that we could investigate to see if we can fix this?
We'll need the Session ID to persist across page loads.

Any advice appreciated.

Comments

sam moore’s picture

Turns out it was Varnish that was preventing the cookies being set properly. Once we turned that off, anons could use the app as designed.