XF 2.3 Miscellaneous changes for XenForo 2.3

Due to time constraints and family matters, this is a slightly different HYS to what was planned, but it is still a bumper feast of new features coming in XenForo 2.3. This week we will be mostly focusing on a bunch of smaller new changes and improvements we're no less excited to show you in the near future.

This is a somewhat lengthy post so we will say goodbye here and we will see you for more 2.3 goodies next week.

Sign in with Apple​

To join our existing suite of connected account providers, in XenForo 2.3 we are adding support for Sign in with Apple. The set up for this one will be a little more onerous, requiring an Apple developer account and the creation of a certificate file that will need to be uploaded through our UI:

hys_6_apple_1.png


Before release, we will be documenting the full setup process through the XenForo manual. There is also an additional step required for users who sign up with Apple's "Hide my e-mail" feature.

Once enabled, users will be able to sign in, or sign up with the Apple button in the relevant places.

hys_6_apple_continue.png


Search users for connected accounts​

If you've ever wondered which of your users have which connected accounts connected, you can now pull that list directly from the "Search users" page in your admin control panel.

hys_6_user_search.png


Simply select the specific connected account(s) you want to search for, and the list of users who have those accounts connected will be displayed.

IndexNow support​

In XenForo 2.3 you can now enable support for IndexNow. This is a recent initiative by Bing, Yandex and others, which allows you to directly notify them whenever content is created, updated, or deleted on your forum. Whenever one of these events happens, a job is enqueued to submit the URL to IndexNow. This avoids the need for generating huge sitemap files which may or may not be read by search engines.

Due to limited support by search engines, including Google, the sitemap generation remains in place and remains unchanged, but IndexNow is available for those search engines which support it either now or in the future.

Generically queued and retryable jobs​

Starting with XenForo 2.3, the existing job system has been enhanced with additional tracking which allows it to be used as a generic queueing system. In XenForo 2.2, mails are added to a special queue table before being processed. This functionality remains largely unchanged, but instead of queueing mails to be sent in their own table, they are now queued directly into the xf_job table.

It's not just mails which are queued in this way. The sending of push notifications and webhooks are also now queued into the job system, so there is little to no noticeable delay when submitting content which might generate one or more of these to be sent.

In addition to queueing these items in this way, developers can also opt in to having their jobs be retryable in the event of failure. This maintains the current behaviour of the existing mail queue and also allows webhooks to be retried in the event of failure.

The cool off between retrying can be configured directly in the Job class or use sensible defaults so that the delay between retries is lengthened based on the number of previous attempts.

After a certain number of failed attempts, the jobs can be marked as failed and they are stored in a new xf_failed_job table.

Bundled support for remote object storage​

Thanks to some changes in the AWS SDK for PHP we are now able to ship, alongside XenForo, the parts of the library which are responsible for communicating with Amazon S3 and compatible object storage services.

The setup instructions provided by the below resource are still required:

But starting with XenForo 2.3 you will no longer need to install an "add-on" in order to configure it. Calling it an "add-on" is a little bit of a misnomer as all it really does is include the (previously) humongous AWS SDK. Now we can include just the Amazon S3 SDK parts, there are fewer steps required to offloading your storage to a remote service, like Amazon S3, Cloudflare R2 and many others.

Full InnoDB support with improved MySQL search​

In days gone by, there were good reasons for our continued use of MyISAM and MEMORY tables in MySQL. Though as the years have progressed, the need for these storage engines in databases have long been negated by better hardware performance and improvements in InnoDB.

Starting with XenForo 2.3 we are automatically converting most of the remaining tables to use InnoDB and for new installs we are making all tables use InnoDB by default.

The only table that requires manually converting is the xf_search_index table. For existing installations, due to differences in the full-text search implementation, you will need to run a CLI command named xf:convert-search-innodb, which will empty, convert and optionally rebuild the search index for you.

Full text search using InnoDB should be an improvement right out of the gate as it offers a lower default minimum word length and a much smaller set of stop-words, along with an improved scoring algorithm. We now even support relevancy search order out of the box, something that was previously a XenForo Enhanced Search exclusive feature, though this will be subject to real world testing before we can comment on whether it is useful.

Due to these changes we are going to be requiring a minimum of MySQL 5.7 or MariaDB 10.2 starting with XenForo 2.3.

Native 'sticky' and date/time inputs​

Due to ancient browser quirks which should no longer be relevant and improved HTML standards, we are now handling sticky elements and date inputs natively without the use of third party libraries.

In terms of 'sticky' support, this affects mostly the admin control panel navigation and the sticky header on the public side in some legacy cases. For the most part, you shouldn't see any difference and the experience, particularly for the admin control panel navigation, should be a lot less janky in some of the cases.

Date inputs within XenForo have now been replaced with native date inputs, rather than using a third party library. Each browser/OS will render the date picker slightly differently, as seen below (Chrome, Firefox, macOS Safari and iOS pictured):

hys_6_date_chrome.png
hys_6_date_firefox.png
hys_6_date_safari.png
hys_6_date_apple.png

But all of them are at least much more functional than they used to be and will be familiar to people who have used the date inputs before.

In addition to supporting date inputs with the existing <xf:dateinput> tag, we also support date and time inputs with the <xf:datetime> tag and time inputs using the <xf:timeinput> tag, which correspond to the HTML standard <input type="date">, <input type="datetime-local"> and <input type="time"> tags respectively.

Auto refresh "board inactive" page​

For those times when you need to turn your forum off, you will have used the "board is active" toggle to do so. This page will now automatically refresh every 60 seconds so when the forum is back up, people will be back using your site sooner without needing to hit refresh.

Anchor links for headings​

Every time a heading is used within content, it now has an automatic anchor link generated which can be accessed on hover via the link icon that appears next to the heading:

hys_6_heading.png


This will allow you to link directly to headings within your content.

Email notifications for moderators​

Sometimes it can be tricky keeping up to date with the various goings on with a busy forum, or if you're a small team, sometimes it can be difficult to respond to various moderator tasks.

To make that easier in XenForo 2.3, moderators can now opt-in to email alerts for new reported content or new content awaiting approval,

hys_6_moderator_emails.png


With these preferences enabled (on a per-moderator basis under account preferences), whenever any of those actions require attention, an email will be sent to those moderators.

User ID matches expression​

New for 2.3 is an addition to the user criteria selector that allows CSS-style :nth-child selectors against user IDs. While this might initially sound like gobbledygook, there is a powerful application for this tool.

1698099926187.png


Let's imagine that you have a user group promotion that grants access to a 'Testing group' user group, and applies to all users with a 2n value for 'User ID matches expression. This promotion will apply to any user whose user ID is even. You can then enable specific functionality for users in the 'Testing group', and use various tools to measure their engagement with those tools, compared to those not in that group who do not have access to the changed functionality. In short, you have a quick and easy way to do A/B testing on your entire user base.

Of course you don't have to limit your testing to one group. You could set up 3n, 3n+1 and 3n+2 criteria on three separate promotions to divide your user base into three groups, or set up segregation however you like.
 
Last edited:
@digitalpoint tried to tell you this (with more words):


Really, if you are sending more than a handful emails - use a provider that does this properly or at least use an intermediate MTA (that delivers via smarthost).
Reinventing the wheel at application level doesn't make sense (and only screams for trouble).

Yeah, I'm going to have to look more into this. I'm not in a huge hurry so I've got time to, hopefully, be able to read up on it and figure out how to do this myself on my server. For the last several years, even though I pay for server management, I've tried my best to just learn how to figure things out on my own. From what I've read in the past, though, this one seems a bit over my head so I think I was just hoping for an easier solution (not knowing that it'd be a dumb way to handle it). I've considered using something like Amazon SES, but I'd rather just use my own server, if possible, because I don't think there's a need for me to pay for that service if I can just use what I'm already paying for. If I were sending 5k+ emails a month, maybe, but I'm talking about a batch of less than 1k no more than a few times a year. The rest of the emails I send out are transactional emails from XF and replies to the contact form.

Anyways, that's just a long way to say that I'm going to do my best to figure this one out the proper way and, again, I thank y'all for your replies. Two of, from what I can tell, the most knowledgeable members of this forum can't both be wrong...in other words, time to get to reading again.

@mjda

Set it up with your host

I don't mean to be rude but you probably know less about this than I do. I'm not asking how to send an email to 3 members. I'm talking about sending 1,000 at a time. Very unlikely that's an issue you've run into before, or will run in to any time soon.
 
I've considered using something like Amazon SES, but I'd rather just use my own server, if possible, because I don't think there's a need for me to pay for that service if I can just use what I'm already paying for.

Not recommended at all. The problem with mail sending is you want your mails sent by a trusted server otherwise you risk all your emails being marked as spam. It's tough to run your own mail server for this reason. And also this is why XF has a bounced email system because if your emails bounce, you will appear as a spam source. It's really important to have a low bounce rate, and much easier to use an established server to send emails.
 
Not recommended at all. The problem with mail sending is you want your mails sent by a trusted server otherwise you risk all your emails being marked as spam. It's tough to run your own mail server for this reason. And also this is why XF has a bounced email system because if your emails bounce, you will appear as a spam source. It's really important to have a low bounce rate, and much easier to use an established server to send emails.

I know it's complicated but in my case 99% of all emails I'll send in a year are the XF generated emails. I make use the bounce and unsubscribe options in XF. I've never been contacted about an email not reaching a mail box and my contact info is easy to find on my site. I really think, especially in my case, it's a bit silly to pay for a mail server to send 1k emails twice a year and the rest of the year it's just transactional emails that my server delivers just fine.

That said, if I'm not able to find a way to deliver those 1k emails without getting temporarily blocked by Yahoo and Google then I'll have no choice. I am reading about it today but it looks like it'll be pretty complicated to accomplish with Exim. We'll see what happens...
 
Last edited:
I really think, especially in my case, it's a bit silly to pay for a mail server to send 1k emails twice a year
What do you mean by pay for a mail server? Amazon SES is a service / endpoint, so you'd be paying $0.20 per year to use it without setting up a server.

Cloudflare also has a free email sending partnership with MailChannels if $0.20 per year is out of budget or SES is too difficult to use.
 
There's an overhead to running Elasticsearch because it's an additional service running, with its own storage requirements, so there is that to factor in, but I would expect it will have an overall net advantage over MySQL.
I've noticed that newer ES versions seem to need fewer resources than the older ones. We're indexing over 32 million posts, a couple million conversations, nearly a million threads, and can support over 3,000 online visitors with our memory settings being very modest, and search results are still returned much faster than PHP can generate the results page. Size of our ES 6 data directory is 7.1GB.

For a smaller forum project, I run ES on its own small cloud server and I feel as though it nearly sits idle most of the time.

IMHO it's well worth setting aside some modest resources for substantial gains in search performance. I can't imagine going back to fulltext searches.
 

Full InnoDB support with improved MySQL search​

In days gone by, there were good reasons for our continued use of MyISAM and MEMORY tables in MySQL. Though as the years have progressed, the need for these storage engines in databases have long been negated by better hardware performance and improvements in InnoDB.

Starting with XenForo 2.3 we are automatically converting most of the remaining tables to use InnoDB and for new installs we are making all tables use InnoDB by default.

The only table that requires manually converting is the xf_search_index table. For existing installations, due to differences in the full-text search implementation, you will need to run a CLI command named xf:convert-search-innodb, which will empty, convert and optionally rebuild the search index for you.

Full text search using InnoDB should be an improvement right out of the gate as it offers a lower default minimum word length and a much smaller set of stop-words, along with an improved scoring algorithm. We now even support relevancy search order out of the box, something that was previously a XenForo Enhanced Search exclusive feature, though this will be subject to real world testing before we can comment on whether it is useful.

Due to these changes we are going to be requiring a minimum of MySQL 5.7 or MariaDB 10.2 starting with XenForo 2.3.
I wanted to ask: in my current forum it is not possible to search for a word less than 5 characters, because the MYSQL definitions do not allow it. I can't change these settings, because I'm hosted on shared hosting.
Will this change solve the problem, and I will be able to search the forum for words with 3 characters, regardless of the general MYSQL settings?
 
I wanted to ask: in my current forum it is not possible to search for a word less than 5 characters, because the MYSQL definitions do not allow it. I can't change these settings, because I'm hosted on shared hosting.
Will this change solve the problem, and I will be able to search the forum for words with 3 characters, regardless of the general MYSQL settings?
It's a different setting for InnoDB with different defaults, so maybe that will help.

For MyISAM, the option is ft_min_word_len, and the default is 4.

For InnoDB it's innodb_ft_min_token_size, and the default is 3.

Ultimately it's up to the system administrator (whoever controls the MySQL settings) to what will be used (it's a global variable, not one that can be controlled at the session level), but maybe they left it at the default of 3 characters...
 

Anchor links for headings​

Every time a heading is used within content, it now has an automatic anchor link generated which can be accessed on hover via the link icon that appears next to the heading:
Hopefully we will be able to toggle this on and off. As it is right now, there would be literally dozens of anchors for headings in my threads.
 
Hi @Chris D

I know it might be quite late for suggestions or questions. But can we set the default thread type in XF2.3? I don't use general thread type and I set question threads type as default in my forum with 3rd party addons. I think this should be the default. Is there any improvement on this topic?
 
Hi @Chris D

I know it might be quite late for suggestions or questions. But can we set the default thread type in XF2.3? I don't use general thread type and I set question threads type as default in my forum with 3rd party addons. I think this should be the default. Is there any improvement on this topic?
I'm pretty sure you can just make a question node and it'll all be questions in current build. No need for 2.3
 
I'm pretty sure you can just make a question node and it'll all be questions in current build. No need for 2.3
There will be still general discussion threads in that forum. I permanently disable general thread discussions in my forum and I am using other thread types. General discussion type is useless now.

Many people like me use their forums with mixed forum thread types. For example, If I have a forum like "Wastewater Treatment", you should create questions, articles and polls. You cannot simply say this is a question forum.
 
Last edited:
It's not just mails which are queued in this way. The sending of push notifications and webhooks are also now queued into the job system, so there is little to no noticeable delay when submitting content which might generate one or more of these to be sent.
I have been noticing delays on posting old threads on my board. So, I am very much waiting for this release primarily for this. Hard to tell if it makes a difference here. But it definitely should on my own board! I always assumed it was due to email delivery but I imagine the delay could be push notification related.
 
Ultimately I would expect MySQL full text search, even when utilising InnoDB as its engine, will still not be a great option when compared to Elasticsearch, particularly with large / busy forums. Though it will very likely be an improvement over the existing MyISAM based full-text search.

There's an overhead to running Elasticsearch because it's an additional service running, with its own storage requirements, so there is that to factor in, but I would expect it will have an overall net advantage over MySQL.

The addition of FULLTEXT indexes is great. IPS 4’s implementation was broken so I patched it and it now runs lightning fast searches on a big board.

Now, with ElasticSearch/XFES, the only and main benefit from my view is that it can catch spelling errors and show results for those.

But that alone is almost never worth the cost of a bigger or separate server for ES.
 
Last edited:
Top Bottom