Xenforo 2.1 Xenforo Caching issue

moohook

Well-known member
Registered
Joined
Feb 8, 2019
Messages
108
Points
38

Reputation:

Hey all, when I log into my account it's fine but when I navigate to a different page it's showing login and register buttons as if I am not logged in when I am, when I go back to homepage it shows my user account. I have searched endlessly on google and duckduckgo so you guys are my last resort.

I strongly believe this is a caching problem, it has been reported on official xenforo forums but no solid fix

I disabled cloudflare on my domain and it is still happening so it must be something to do with Xenforo software caching, any help or advice would be appreciated.
 

moohook

Well-known member
Registered
Joined
Feb 8, 2019
Messages
108
Points
38

Reputation:

I am getting this error too not sure if it's related but when clicking the dropdown for a addon it shows this error:

963b4fed444b52e0473ef82e909c7a85.png
 

moohook

Well-known member
Registered
Joined
Feb 8, 2019
Messages
108
Points
38

Reputation:

When I press CTRL+F5 (force refresh) it works so definitely a caching issue
 

WinSys32

Collaborate
Collaborate
Registered
Joined
Oct 10, 2019
Messages
57
Points
63

Reputation:

Edit the config.php and set your forum in development mode
Login to your server with SSH with Putty as example, navigate to your xenforo root folder

type: php cmd.php list
You will see a overvieuw with options you can do

to use an option, in this example the rebuild-caches option

Type: php cmd.php xf-dev:rebuild-caches

And try again :)
 

moohook

Well-known member
Registered
Joined
Feb 8, 2019
Messages
108
Points
38

Reputation:

Edit the config.php and set your forum in development mode
Login to your server with SSH with Putty as example, navigate to your xenforo root folder

type: php cmd.php list
You will see a overvieuw with options you can do

to use an option, in this example the rebuild-caches option

Type: php cmd.php xf-dev:rebuild-caches

And try again :)
WinSys32I managed to fix this issue with these in src/config.php

$config['enableLoginCsrf'] = true;

// FIX IP ADDRESS FOR PROXY
$_SERVER['REMOTE_ADDR'] = $_SERVER['server-host-name-here-not-ip'];

$config['pageCache']['enabled'] = false;
$config['cache']['enabled'] = false;
$config['cache']['sessions'] = false;

How ever there are some minor issues related to my issue before so I will remove above and try your way. Thank you so much for such a detailed response I will update you if it works!
 

jim

Well-known member
Registered
Joined
Aug 20, 2021
Messages
112
Points
38

Reputation:

I had the same issue, After I upgraded the to 2.2.7 the problem was gone.
 
Top