• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Fixed Tagging causes server hiccups

AlexT

Well-known member
#1
See screenshot. Try to enter exactly the text as shown in the screenshot.
Snap1.png

It will cause this error in UserTagging:_getTagMatchUsers():

Zend_Db_Statement_Mysqli_Exception: Mysqli prepare error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM xf_user AS user WHERE () ORDER BY LENGTH(user.username) DESC' at line 3 -library/Zend/Db/Statement/Mysqli.php:77

It seems that the regex in UserTagging:_getPossibleTagMatches() stumbles over this text with wrong matches, which then leads to the erroneous SQL query.
 
Last edited:

Vincent

Well-known member
#2
Here's the full error message:

Code:
Mysqli prepare error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM xf_user AS user WHERE () ORDER BY LENGTH(user.username) DESC' at line 3
Zend_Db_Statement_Mysqli->_prepare() in Zend/Db/Statement.php at line 115
Zend_Db_Statement->__construct() in Zend/Db/Adapter/Mysqli.php at line 381
Zend_Db_Adapter_Mysqli->prepare() in Zend/Db/Adapter/Abstract.php at line 478
Zend_Db_Adapter_Abstract->query() in XenForo/Model/UserTagging.php at line 117
XenForo_Model_UserTagging->_getTagMatchUsers() in XenForo/Model/UserTagging.php at line 16
XenForo_Model_UserTagging->getTaggedUsersInMessage() in XenForo/DataWriter/DiscussionMessage/Post.php at line 70
XenForo_DataWriter_DiscussionMessage_Post->_messagePreSave() in XenForo/DataWriter/DiscussionMessage.php at line 391
XenForo_DataWriter_DiscussionMessage->_preSave() in XenForo/DataWriter.php at line 1434
XenForo_DataWriter->preSave() in XenForo/ControllerPublic/Thread.php at line 541
XenForo_ControllerPublic_Thread->actionAddReply() in XenForo/FrontController.php at line 337
XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
XenForo_FrontController->run() in C:/Program Files (x86)/Ampps/www/XenForo/index.php at line 13