XF 2.1 Cookies error

MBJ86

Member
Hi all,

I have multiple members using multiple devices and browsers reporting that when they click a link from their email (like a reply notification) or a link within the forum itself to another place in the forum, they are logged out and told that cookies are required, but not given any options to confirm anything about cookies.

Our forum is really struggling with this, can anyone help?

Here is what happens when I click a link to a page within the forum, OR when I click a reply notification in my email. I am logged out, for one:

1596730239240.png


And this is what happens when I click "Log in":


1596730274036.png
 

Chris D

XenForo developer
Staff member
Your website is accessible from multiple URLs which, while they look the same, are treated as different sites by the browser. This can cause cookie issues.

As an example you have your site available over at http://example.com http://www.example.com https://example.com and https://www.example.com.

As far as browsers are concerned, each of these URLs has its own cookies and that will likely be what you're seeing.

First thing to do is to decide which of the URLs you want. Obviously we'd recommend one of the https:// versions.

Then you need to update your Admin > Options > Basic options > Board URL value to that exact URL.

Finally enable "Enable board URL canonicalization".

From that point forward no matter which URL a user lands on, we'll redirect if necessary to make sure they're on the correct one and this should prevent all of the cookie/being logged out type issues you're seeing.
 

MBJ86

Member
Your website is accessible from multiple URLs which, while they look the same, are treated as different sites by the browser. This can cause cookie issues.

As an example you have your site available over at http://example.com http://www.example.com https://example.com and https://www.example.com.

As far as browsers are concerned, each of these URLs has its own cookies and that will likely be what you're seeing.

First thing to do is to decide which of the URLs you want. Obviously we'd recommend one of the https:// versions.

Then you need to update your Admin > Options > Basic options > Board URL value to that exact URL.

Finally enable "Enable board URL canonicalization".

From that point forward no matter which URL a user lands on, we'll redirect if necessary to make sure they're on the correct one and this should prevent all of the cookie/being logged out type issues you're seeing.

Thanks, Chris! I was able to follow that all very easily and so far I'm not getting the errors when clicking through email notifications OR through within-board links. (y)
 
Top