Search...

xenForo 2.3 specifics (and upgrade)

I’ve upgraded the BikeGremlin forum from xenForo 2.x to XenForo 2.3. These are my notes on the stuff I did and tested.

Table Of Contents (T.O.C.):

  1. Upgrade (update) process
  2. Plugin/add-on compatibility
    2.1. LiteSpeed Cache for XF2
  3. Styles/themes & dark mode 🙂
    3.1. Enable syle versions
    3.2. Enable the dark mode version for your style
    3.3. How to chose the light/dark mode display
  4. Image optimization
    4.1. Configure your hosting server
    4.2. Configure the xenForo image optimization
  5. Anchor links – yes! 🙂
  6. Upgrade to 2.3.2 problems
    6.1. Dark/light mode switch bug – fixed!
    6.2. Redis bug – fixed!
  7. Suhosin and Snuffleupagus?
  8. Conclusion


1. Upgrade (update) process

The process was basically the same as for upgrading to version 2.2.16. With one exception:
Since this is a new version (not just a patch), you may need to disable all the add-ons and plugins before updating or run the update on staging and see if it all goes well.

See section 4.1 for sever configuration tips (if you are running the version 2.2.15 or 2.2.16, you should manage to do the update without any changes, and then test with newer PHP – just to make troubleshooting simpler).

After you’ve configured and checked everything (as described in the page linked above), you can set your PHP version to 8.3 (2.2.15 and 2.2.16 support up to 8.2, but xenForo 2.3 supports PHP 8.3).

Minimum PHP is 7.2, recommended is 8.3;
Minimum MySQL 5.7, recommended is 8.0;

I have run all this in a staging environment (that article deals with WordPress, but the principles are the same for xenForo too), it all went well, but I will wait for a while before pushing the updates to production.

– T.O.C. –


2. Plugin/add-on compatibility

2.1. LiteSpeed Cache for XF2

At the time of writing, LiteSpeed Cache for XF2 is the only plugin that I am using. It works fine.
How to install and test LiteSpeed Cache for XF2

Nothing to add. I will update this as I get new information and do further testing.

Update:
There is a bug when it comes to using dark mode for guest (non-registered) users (the forum always switches back to default, regardless of the visitor’s choice). Disabling the LiteSpeed addon is the only way to fix that for now.

– T.O.C. –


3. Styles/themes & dark mode 🙂


If you wish to enable the dark mode, you need to:

Then, if you choose to allow it, forum visitors may also be able to choose the version they prefer (system default, light, or dark).

– T.O.C. –


3.1. Enable syle versions

  • a)
    Go to:
    Appearance -> Styles ->
  • b)
    Click on the theme you wish to enable the dark mode for.
  • c)
    Check the checkboxes for “Enable variation” (and “Allow user selection” if you wish to let users choose the version they prefer).

– T.O.C. –


3.2. Enable the dark mode version for your style

  • a)
    Go to:
    Appearance -> Styles ->
  • b)
    Click on the style properties for the theme you wish to enable the dark mode for.
  • c)
    Click on the “Color palette” option.
  • d)
    Click on the checkboxes to set the default, and the alternate style versions (I set the light to be the default version).

xenForo 2.3 comes with the dark mode option. I’m using a theme based on the default theme, with minimum edits (for better compatibility when updating).

– T.O.C. –


3.3. How to chose the light/dark mode display

If you’ve enabled visitors to choose the preferred option (“Allow user selection” checkbox), you (and the visitors) can use the button at the bottom to chose the version you prefer:

Note 1:
The “System” option will display the forum mode based on the settings of your operating system. Some Windows and Linux versions let you set your general operating system theme to light or dark, or to switch between the two based on the time of day.

Note 2:
In the admin menu, the system/light/dark mode selection option is in the bottom-right corner.

– T.O.C. –


4. Image optimization

The update I was looking forward to (don’t care much for the dark mode – though I’m sure that some visitors will appreciate that too 🙂 )!

xenForo can now better optimize images right out of the box (no need for special add-ons/plugins for that). 🙂

To enable the image optimization:


4.1. Configure your hosting server

Make sure you have a properly installed and configured PHP 8.3 (though it should work with older PHP versions too, especially with any 8.x version, and even 7.2 or newer).

Make sure that the imagick PHP extension is enabled. These articles might help you with that:

– T.O.C. –


4.2. Configure the xenForo image optimization

  • a)
    Go to:
    Setup -> Options -> Attachments
  • b)
    Check the options “Imagemagick PECL extension” and “Optimize images.”
  • c)
    Go to:
    Tools -> Rebuild caches
    There, you can rebuild caches to optimize the existing images on your forum.

The relevant caches you should rebuild for this are:
– Rebuild icon usage
– Optimize attachments (causes increased CPU and RAM load – see the load picture below)
– Optimize avatars
– Optimize profile banners
– Rebuild attachment thumbnails

Note – the “Optimize attachments” will cause increased CPU and RAM usage (if you run out of RAM, the forum will crash, while CPU load limit will just make stuff run slower):

A drastic CPU (and a moderate RAM) usage increase when doing the "Optimize attachments"
“The load picture” 🙂
A drastic CPU (and a moderate RAM) usage increase when doing the “Optimize attachments”

– T.O.C. –


5. Anchor links – yes! 🙂

Anchor links is one of the features I was really looking forward to. It has arrived – but it needs some polishing.

Why are anchor links so important?

You can see the table of contents at the start of this article (and most of my articles and even YouTube videos for that matter). It lets you click on any “chapter” and have the screen scroll to that point. That was not possible to do with XenForo versions before the 2.3, but it has finally arrived.

A TOC would be very helpful for posts like my forum user tutorial.

This is what the anchor links feature looks like now:

XenForo 2.3 anchor links
XenForo 2.3 anchor links

It does have a few bugs though (my XenForo bug report link):

You must publish a post in order to see the anchor links.

The links themselves are auto-generated for each heading paragraph – so no control.

What do I mean by that? It’s a lot more practical to just use “chapter” numbers as anchor links. For example, the anchor link to this section is ” #5 “. Simple to remember and refer to.

Unfortunately, XenForo generates anchor links from the whole text of the heading paragraph. If this article were not a WordPress post, but a XenForo post instead, the anchor link for this section would look like this:
#-5-anchor-links—yes-

It gets even worse if you use the cyrilic alphabet. Just one example – the anchor link for a chapter called ” Поглавље на ћирилици​ ” looks like this:
#-3-%D0%BF%D0%BE%D0%B3%D0%BB%D0%B0%D0%B2%D1%99%D0%B5-%D0%BD%D0%B0-%D1%9B%D0%B8%D1%80%D0%B8%D0%BB%D0%B8%D1%86%D0%B8

I hope this gets patched soon. I can run with it as it is, but I would highly prefer to see this improved.

– T.O.C. –


6. Upgrade to 2.3.2 problems


6.1. Dark/light mode switch bug

Update, September 2024: this problem has been fixed with XenForo 2.3.3 version update.

Not a XenForo issue – seems to be Cloudlfare-related.

One problem I’ve noticed was when switching to and from the dark mode. Setting Cloudflare Cache TTL from “Respect existing headers” to a short period, and clearing the cache seems to have solved this problem. Reverting back to the “Respect existing headers” then works normally, after my browser has loaded a “fresh” version, apparently. I will leave the shorter TTL for a few days so that all the visitors get to load the fresh version, before reverting again back to “Respect existing headers.”

My guess is that this problem is related to the LiteSpeed Cache add-on I had used in the previous XenForo version (2.2.x) – the browser was probably using the saved cache as instructed before.

– T.O.C. –


6.2. Redis bug

Update:
Not a XenForo issue – this was my error when configuring.
I should only have configured the socket, not the port. Will edit the XenForo config article. A relevant XenForo forum support article (on a Sunday morning of all days – top class support by both XenForo and MDDHosting I must say):
https://xenforo.com/community/threads/xenforo-2-3-2-redis-edit-not-a-bug-user-error.223969/

After I’ve updated to the patched XenForo 2.3.2 version on a staging environment, I decided to try updating the production version. I got this error and the forum just crashed:

Symfony\Component\Cache\Exception\InvalidArgumentException: Redis connection failed: No such file or directory in src/vendor/symfony/cache/Traits/RedisTrait.php at line 299
Symfony\Component\Cache\Adapter\RedisAdapter::Symfony\Component\Cache\Traits\{closure}() in src/vendor/symfony/cache/Traits/RedisTrait.php at line 308
Symfony\Component\Cache\Adapter\RedisAdapter::createConnection() in src/XF/CacheFactory.php at line 322
XF\CacheFactory->createRedisCache() in src/XF/CacheFactory.php at line 126
XF\CacheFactory->instantiate() in src/XF/CacheFactory.php at line 49
XF\CacheFactory->create() in src/XF/App.php at line 820
XF\App->XF\{closure}() in src/XF/Install/App.php at line 87
XF\Install\App->XF\Install\{closure}() in src/XF/Container.php at line 210
XF\Container->XF\{closure}() in src/XF/Container.php at line 233
XF\Container->create() in src/XF/Install/App.php at line 319
XF\Install\App->cache() in src/XF/Install/Upgrader.php at line 605
XF\Install\Upgrader->clearRegistryCache() in src/XF/Install/Upgrader.php at line 97
XF\Install\Upgrader->completeUpgrade() in src/XF/Install/Controller/Upgrade.php at line 293
XF\Install\Controller\Upgrade->actionRunJob() in src/XF/Mvc/Dispatcher.php at line 362
XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 264
XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 121
XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 63
XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2813
XF\App->run() in src/XF.php at line 802
XF::runApp() in install/index.php at line 16

The first thing I did was try to disable the redis cache – by doing the reverse of how I’ve enabled Redis for XenForo.

To confirm, I enabled Redis on the staging, and got the forum to crash. After reverting the edits of the config file (as shown in the link above), the forum got back to running normally.

OK, that was my bad for having forgotten to create an exact staging test environment as the production. DOH! 🙂

With Redis disabled, it all works OK.

– T.O.C. –


7. Suhosin and Snuffleupagus?

What the hell is Snuffleupagus?! I had to Google it. XenForo 2.2.x listed Suhosin, while the 2.3.x lists Snuffleupagus. I’ve discussed Suhosin at the end of chapter 1 in the XenForo install and security article. Didn’t need it, had no problems without it. Not 100% sure it’s the same situation with the Snuffleupagus.

– T.O.C. –


Conclusion

I will try to keep this up-to-date upon further testing, as new information comes along.

BikeGremlin forum topic discussing the XenForo 2.3 update (and bugs 🙂 ).

The relevantXenForo community pages:

While I am eager to implement all the cool features introduced with the 2.3 version, I think it is wise to wait a while even after the patch 2.3.1 is published (just to see if there are any further major bug reports or problems).

– T.O.C. –


Last updated:


Originally published:




Please use the BikeGremlin.net forum for any comments or questions.

If you've found any errors or lacking information in the article(s) - please let me know by commenting on the BikeGremlin forum.
You can comment anonymously (by registering with any name/nickname), but I think it is good to publicly document all the article additions (and especially corrections) - even if their author chooses to remain anonymous.

Tools and other products that I use (and can recommend)

Skip to content