Michael A.
Well-known member
No chance to look into this yet, last month was a busy one. I do however plan to start looking into this today. Sorry for the waitany news?

No chance to look into this yet, last month was a busy one. I do however plan to start looking into this today. Sorry for the waitany news?
Is there any paid version available other than community edition which can cache logged in users as well ? @Michael A.
Is there any paid version available other than community edition which can cache logged in users as well ? @Michael A.
Frode789 is correct.Sadly this is it. They have very little focus on XF.
That is an interesting one, I'll look into reproducing this behavior locally today.Here is an interesting bug:
I reset an accounts password and am redirected to the home page, from here I'm given a static cached version, A hard refresh does not update nor clear. I view certain forums or threads and I am logged back in to that account but going back to the homepage presents the guest cached version. To work around this, I can access a logged in forum / thread post password change (same session) and log out from there and log back in directly from the homepage.
Video:
(email is sent via amazon ses / tracked)
That is an interesting one, I'll look into reproducing this behavior locally today.
Thanks for the report,
-Michael
For me I can now 100% confirm it was the caching that caused this issue. I disabled the primary rewrite rules on placed in htaccess, replaced it with the "RewriteRule (.*) - [E=Cache-Control:no-cache]" string and made sure the headers showed no hit and then began another reset. This time it worked, no static cached content and I was directly logged in without having to go to non cached pages.
Hopefully you can replicate this.
index.php?account/security
(a "no-cache "page) but on reset I do not get redirected to the home page so I am not seeing this behavior at all.[Improvement] Added "lost password confirm" as a do-not-cache page.
[Improvement] Misc code improvements.
[Bug Fix] Logged-in cookie is now cleared when a visitor is logged-out due to a session timeout.
[Bug Fix] Visitors automatically logged-in from the "forgot my password" submission page are now correctly detected as non-guest visitors.
Thank you!Michael A. updated LiteSpeed Cache for XF2 - Community with a new update entry:
LiteSpeed Cache Plugin for XF2 v2.3.0
Read the rest of this update entry...
Which plugin only needs to be activated or does it need to be configured?
I can't find anywhere how to configure it.
# LiteSpeed XenForo cache
<IfModule litespeed>
CacheLookup public on
RewriteEngine On
# cache
RewriteCond %{HTTP_COOKIE} !(xf_lscxf_logged_in|xf_user|xf_session_admin) [NC]
RewriteCond %{REQUEST_URI} !/install/ [NC]
RewriteRule .* - [E=Cache-Control:max-age=360,E="cache-vary:xf_style_id,xf_language_id"]
# no cache
RewriteCond %{HTTP_COOKIE} (xf_lscxf_logged_in|xf_user|xf_session_admin) [NC]
RewriteRule .* - [E=Cache-Control:vary=loggedin,E=Cache-Control:no-cache]
</IfModule>
class Login extends XFCP_Login
{
/**
*
* @noinspection PhpUnused
*/
public function completeLogin( User $user, $remember )
{
if ( $user->user_id !== XF::visitor()->user_id ) {
/**
* Set custom cookie to better track logged in state when
* "Stay logged in" is unchecked.
*/
XF::app()->response()
->setCookie(LscListener::LOGGED_IN_COOKIE_NAME, 1)
;
}
/** @noinspection PhpUndefinedClassInspection */
parent::completeLogin($user, $remember);
}
}
should bepublic function completeLogin( User $user, $remember )
public function completeLogin( $user, $remember )
I don't think so its this addon doing it wrong. Your other addon need an update.Looks like the code here is not written correctly:
LiteSpeedCache/ XF/ ControllerPlugin/Login.php
Code:class Login extends XFCP_Login { /** * * @noinspection PhpUnused */ public function completeLogin( User $user, $remember ) { if ( $user->user_id !== XF::visitor()->user_id ) { /** * Set custom cookie to better track logged in state when * "Stay logged in" is unchecked. */ XF::app()->response() ->setCookie(LscListener::LOGGED_IN_COOKIE_NAME, 1) ; } /** @noinspection PhpUndefinedClassInspection */ parent::completeLogin($user, $remember); } }
should be
It was causing problems with another add-on
public function completeLogin(\XF\Entity\User $user, $remember)
Thanks... I redact my statement.Hello @Kleazy,
@JustinHawk is correct here, your other addon is implementing this incorrectly.
For reference, this is the function definition we are extending here:
PHP:public function completeLogin(\XF\Entity\User $user, $remember)
We use essential cookies to make this site work, and optional cookies to enhance your experience.