wbntff So, it seems that Flarum doesn't clear settings from extensions and you will have to remove these settings manually.

    rafaucau yes.. and somewhere cache is still stored which is being served. Eventhough i ran - php flarum cache:clear , still pages are being served cached.
    Struggling to login (as user and also as admin)
    every login attempt is faced with this message

    Oops! Something went wrong. Please reload the page and try again.

    Out of 20 attempts, 1 succeeds

      wbntff Did you remove the code from the .htaccess file? Specifically, the line CacheLookup on?
      Or, change the <IfModule LiteSpeed> block to the following:

      <IfModule LiteSpeed>
          CacheLookup on
          RewriteEngine On
          RewriteCond %{REQUEST_METHOD} ^HEAD|GET$
          RewriteRule .* - [E="cache-control:no-cache"]
      </IfModule>

      Next, enable the extension, clear the LSCache (not the Flarum cache), disable the extension, and then remove this code from the .htaccess file or remove the CacheLookup on line.

      Another option would be to ask your hosting provider to clear the LSCache from the server.

      wbntff I've updated the documentation in the first post of this discussion. If you placed the code snippet at the very top of the .htaccess file, it might not have worked due to the missing RewriteEngine On directive.


      I'm considering an update in the future that would automate the modification of the .htaccess file using Flarum's migration system. This way, manual configuration of this file wouldn't be necessary.

        rafaucau If you placed the code snippet at the very top of the .htaccess file,

        i've added that code in middle of .htaccess
        it was showing uncached pages only when user is seen logged in, but the problem was with login.
        to see myself logged in, i had to refresh pages multiple times

          wbntff We're going around in circles here. Without more information about your site, there's not much more I can do. Could you at least share details about your login process? Are you using any extensions that modify the login functionality?

          No extension interferes with logic functionality

          after removing litespeed cache


          Flarum core: 1.7.2
          PHP version: 8.1.16
          MySQL version: 10.6.12-MariaDB-log
          Loaded extensions: Core, date, libxml, openssl, pcre, sqlite3, zlib, bz2, calendar, ctype, curl, hash, filter, ftp, gettext, json, iconv, SPL, pcntl, readline, Reflection, session, standard, mbstring, shmop, SimpleXML, tokenizer, xml, i360, bcmath, dba, dom, enchant, fileinfo,gd, imap, intl, ldap, exif, mysqlnd, mysqli, odbc, PDO, pdo_mysql, PDO_ODBC, pdo_sqlite, Phar, posix, pspell, snmp, soap, sockets, sysvmsg, sysvsem, sysvshm, xmlreader, xmlwriter, xsl, zip
          +--------------------------------+---------+--------+
          | Flarum Extensions | | |
          +--------------------------------+---------+--------+
          | ID | Version | Commit |
          +--------------------------------+---------+--------+
          | flarum-flags | v1.7.0 | |
          | flarum-tags | v1.7.1 | |
          | flarum-sticky | v1.7.0 | |
          | flarum-approval | v1.7.0 | |
          | flarum-likes | v1.7.0 | |
          | flarum-markdown | v1.7.0 | |
          | v17development-seo | v1.8.0 | |
          | the-turk-stickiest | 3.0.1 | |
          | malago-ads | 0.3.2 | |
          | fof-split | 1.1.0 | |
          | fof-share-social | 1.1.2 | |
          | fof-nightmode | 1.5.1 | |
          | fof-merge-discussions | 1.3.1 | |
          | fof-formatting | 1.0.3 | |
          | fof-discussion-thumbnail | 1.1.1 | |
          | flarum-suspend | v1.7.0 | |
          | flarum-subscriptions | v1.7.0 | |
          | flarum-statistics | v1.7.0 | |
          | flarum-pusher | v1.7.0 | |
          | flarum-mentions | v1.7.0 | |
          | flarum-lock | v1.7.0 | |
          | flarum-lang-english | v1.7.0 | |
          | flarum-emoji | v1.7.0 | |
          | flarum-bbcode | v1.7.0 | |
          | clarkwinkelmann-likes-received | 1.0.2 | |
          | askvortsov-rich-text | v2.1.7 | |
          +--------------------------------+---------+--------+

          I had to manually delete lscache folder in root so that pages are now served uncached.
          removal process was not easy

            wbntff Do you happen to have Flarum installed in a subdirectory? I haven't tested that scenario, so the issue might lie there.

              v2.0.0

              🚨 Breaking change. Before updating, please remove the <IfModule LiteSpeed>...</IfModule> code block from your .htaccess file. From this version forward, this extension will automatically add the necessary configurations to your .htaccess file when you run the php flarum migrate command after updating the extension.

              Updating Process:

              Before updating, it's recommended to create a backup of your .htaccess file and remove the <IfModule LiteSpeed>...</IfModule> code block. Then proceed with the following commands:

              composer require acpl/flarum-lscache -a
              php flarum migrate
              php flarum cache:clear

              Added:

              • .htaccess file management. The extension now has the capability to edit the .htaccess file. This simplifies the installation process and paves the way for future admin panel options that require editing the .htaccess file.
              • The "Drop Query Strings" option. This feature allows the generation of a single cache version regardless of the query string. By default, parameters such as utm, fbclid, and others are "dropped" or ignored.
              • Introduced a new setting to enable or disable LSCache. If LSCache is turned off, all cached entries will be automatically purged.

              Improvements:

              • Improved the clarity and readability of translations.

              Fixed:

              • Added missing old migration that was causing problems when uninstalling the extension. A backport has also been implemented for v1.0 (see v1.0.2).

              Full Changelog: https://github.com/android-com-pl/flarum-lscache/compare/v1.0.1...v2.0.0

              rafaucau yes.. i have few issues in subdirectory like self likes disabled but still appears enabled but cant help..
              I've wordpress in root directory so had to install flarum in subdir

                wbntff I've wordpress in root directory so had to install flarum in subdir

                It might be possible that if you're using LSCache in WordPress, it could be causing conflicts with Flarum LSCache 🤔. I'll look into this when I find some time.

                wbntff In your WordPress installation, you could create a rule to exclude the directory where your forum is, for example yourdomain.com/flarum as I show you in my screenshot.

                Then you should have no problem enabling @rafaucau LSCache plugin as long as you make sure you have included the modifications in the .htaccess.

                However, there is a third scenario you will need to consider. If you are using Redis cache for objects in your WordPress, you will need to define an alternative database for the Redis cache in Flarum. If you still experience a lot of problems, you should be able to exclude Flarum within the object group.

                  6 days later

                  Oshvam login problems continue.
                  I have excluded /flarum path in wordpress litespeed cache and later installed this 2.0.0 version
                  but user has to refresh page multiple times after loggin in to see themseleves logged in.

                  not using any redis cache for objects neither in WP nor flarum

                    wbntff It's hard to know with so little information. Possibly it has something to do with your .htaccess in Flarum and WordPress. Some kind of conflict.

                    Make sure you don't have the option to serve stale content in the rafaucau extension enabled. It would also be good to know if you use Redis in Flarum, this could be the source of the conflict.

                    wbntff not using any redis cache for objects neither in WP nor flarum

                    I mentioned this ...

                    The problem is with front page or landing page.. when user tried to login from there, they return to same page but without seeing themselves logged in.. (without this plugin, they would return to see themselves logged in.)

                    Now they have refresh that page 2-3 times or go to another page/topic and try to see if they are logged in.

                    .htaccess in /flarum has been modified by this plugin. I didn't add anything extra.
                    If WordPress .htaccess is conflicting, then I have already excluded flarum subdirectory

                      rafaucau can you email me
                      in my site new user cant register and test. so i will give you login details too in email

                      17 days later

                      How to clear cache for a tag whenever a post is made in a topic with that tag ?
                      Excluding tag=xx need to be done for all tags in settings.
                      A new post clears cache of home page and that topic only