XF 2.3 Login Error After Upgrading from XenForo 1.5 to 2.x — Works Only After Refresh

Gautam

Member
Hi everyone,


I recently upgraded my XenForo forum from version 1.5 to the latest 2.x release. Since the upgrade, I’ve been facing a login issue. Here’s what’s happening:


When I try to log in the first time, I get an error message.

Oops! We ran into some problems.
Security error occurred. Please press back, refresh the page, and try again.



However, if I refresh the page and then attempt to log in again, it works fine. The same happens if I navigate to another page before logging in, it logs in successfully within that session.


From what I’ve read in older forum discussions, this could be related to cache settings. My forum is hosted on Cloudways, so I’ve already purged the server cache, but the issue still persists.


Could anyone guide me on what might be causing this or suggest possible fixes? Is there a specific setting or command I should run to clear or rebuild cache properly after the upgrade?


Any insights or solutions would be greatly appreciated.
Thanks in advance!
 
Sometimes this can be caused by having both a non-www and a www cookie, or you have a 2nd cookie for a sub-directory (such as a test install) stored in your browser for the site. Delete all cookies for the site in your browser.

If it continues to happen:

1. Enable advanced options in the administrators section under User groups and then turn on Enable board URL canonicalization under Setup -> Options -> Basic Options.

2. In the src/config.php file add the following:
Code:
$config['cookie']['domain'] = '.yourdomainname.com';
$config['cookie']['path'] = '/';

3. If you have a test install, add this to it's src/config.php so it won't use the same cookie:
Code:
$config['cookie']['prefix'] = 'testxf_'
 
To fix this issue you need to Enable board URL canonicalization:

Admin control panel -> Setup -> Options -> Basic board information -> Enable board URL canonicalization

1762271491939.webp
 
To fix this issue you need to Enable board URL canonicalization:

Admin control panel -> Setup -> Options -> Basic board information -> Enable board URL canonicalization

View attachment 329874

Wait... didn't I just say that?
What You Say Reaction GIF by Bounce
 
Back
Top Bottom