Fixed XenForo search errors instead of reporting the search is too long

Xon

Well-known member
Affected version
2.2.13
XenForo generates an \XF\Entity\Search record for search once done, which has a length limit of 200 characters for the search keywords. However, searches are sent to the search backend before attempting to save the search results.

This means the search can potentially send too long a query to the backend and will instead log a server error instead of reporting to the user the search was too long.

This is most noticeable with the elasticsearch backend, a keyword search which is quite long but just under the limit and then a user who can't view a large number of forums when searching for body+title (ie not title-only), and also then uses a number of facet search terms.

Related XFES error:
 
Thank you for reporting this issue, it has now been resolved. We are aiming to include any changes that have been made in a future XF release (2.3.8).

Change log:
Return an error early when search keyword lengths are too long
There may be a delay before changes are rolled out to the XenForo Community.
 
Back
Top Bottom