MySQL statement prepare error [1064]
Error when trying to use mass management tools
In VW 4.1.6 with XF 2.2.12, when trying to use the mass management tool to search and replace text, I get an error when I click on "prepare and review". It tells me an unexpected error occurred and to try again later. I know this feature is in beta but I thought maybe someone would see something I don't?
From the error log:
Code:
XF\Db\InvalidQueryException: MySQL statement prepare error [1064]: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'offset ASC LIMIT 50' at line 1 src/XF/Db/AbstractStatement.php:230
Generated by: Clara Oswald Apr 8, 2023 at 1:20 PM
Stack trace
SELECT * FROM `xf_vw_searchresult` WHERE searchid = 1 ORDER BY offset ASC LIMIT 50
------------
#0 src/XF/Db/Mysqli/Statement.php(198): XF\Db\AbstractStatement->getException('MySQL statement...', 1064, '42000')
#1 src/XF/Db/Mysqli/Statement.php(41): XF\Db\Mysqli\Statement->getException('MySQL statement...', 1064, '42000')
#2 src/XF/Db/Mysqli/Statement.php(56): XF\Db\Mysqli\Statement->prepare()
#3 src/XF/Db/AbstractAdapter.php(96): XF\Db\Mysqli\Statement->execute()
#4 src/addons/vw/vw/_core/controller/db/xf2.php(170): XF\Db\AbstractAdapter->query('SELECT * FROM `...')
#5 src/addons/vw/vw/_core/model/db/mysql/vw.php(25): vw_DB_Controller_XF2->query_read('SELECT * FROM `...')
#6 src/addons/vw/vw/_core/controller/cp/massive/vw.php(508): vw_DB_MySQL_Model->select(Array)
#7 src/addons/vw/vw/_core/controller/cp/massive/vw.php(455): vw_CP_Massive_Controller->get_massive_results(0, 50, true)
#8 src/addons/vw/vw/_core/controller/cp/massive/vw.php(743): vw_CP_Massive_Controller->search()
#9 src/addons/vw/vw/_core/controller/cp/massive/vw.php(51): vw_CP_Massive_Controller->do_search()
#10 src/addons/vw/vw/Admin/Controller/Wiki.php(108): vw_CP_Massive_Controller->execute('dosearch', 'post')
#11 src/addons/vw/vw/Mvc/Dispatcher.php(30): vw\vw\Admin\Controller\Wiki->_actionIndex(Object(XF\Mvc\ParameterBag))
#12 src/addons/vw/vw/Admin/Controller/Wiki.php(51): vw\vw\Mvc\Dispatcher::dispatch(Object(vw\vw\Admin\Controller\Wiki), 'index', Object(XF\Mvc\ParameterBag))
#13 src/XF/Mvc/Dispatcher.php(352): vw\vw\Admin\Controller\Wiki->actionIndex(Object(XF\Mvc\ParameterBag))
#14 src/XF/Mvc/Dispatcher.php(259): XF\Mvc\Dispatcher->dispatchClass('vw\\vw\\Admin\\Con...', 'Index', Object(XF\Mvc\RouteMatch), Object(vw\vw\Admin\Controller\Wiki), NULL)
#15 src/XF/Mvc/Dispatcher.php(115): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(vw\vw\Admin\Controller\Wiki), NULL)
#16 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#17 src/XF/App.php(2483): XF\Mvc\Dispatcher->run()
#18 src/XF.php(524): XF\App->run()
#19 admin.php(13): XF::runApp('XF\\Admin\\App')
#20 {main}
Request state
array(4) {
["url"] => string(24) "/admin.php?wiki/massive/"
["referrer"] => string(44) "https://amalgam.zone/admin.php?wiki/massive/"
["_GET"] => array(1) {
["wiki/massive/"] => string(0) ""
}
["_POST"] => array(20) {
["_xfToken"] => string(8) "********"
["panel"] => string(7) "massive"
["do"] => string(8) "dosearch"
["action"] => string(7) "replace"
["areachoice"] => array(1) {
[0] => string(1) "4"
}
["prefixchoice"] => array(1) {
[0] => string(2) "-1"
}
["typechoice"] => array(1) {
[0] => string(1) "0"
}
["book"] => string(0) ""
["category"] => string(0) ""
["team"] => string(0) ""
["replacetype"] => string(7) "replace"
["searchtype"] => string(3) "str"
["search"] => string(27) "http://www.screen-gems.net/"
["replace"] => string(21) "https://amalgam.zone/"
["searchcount"] => string(1) "0"
["reason"] => string(28) "mass-edit performed by admin"
["url"] => string(44) "https://amalgam.zone/admin.php?wiki/massive/"
["_xfRequestUri"] => string(24) "/admin.php?wiki/massive/"
["_xfWithData"] => string(1) "1"
["_xfResponseType"] => string(4) "json"
}
}