XF 2.2 Member about spam delete error

Sisterhood

Active member
If I want to delete a user with all his posts about spam it does not work and it comes




  • XF\Db\Exception: MySQL query error [1205]: Lock wait timeout exceeded; try restarting transaction

  • src/XF/Db/AbstractStatement.php:228
  • Generiert von: Unbekanntes Konto

  • 11. Oktober 2020 um 14:33

Stack-Trace​

UPDATE xf_user SET last_activity = ? WHERE user_id = 5180
------------

#0 src/XF/Db/Mysqli/Statement.php(196): XF\Db\AbstractStatement->getException('MySQL query err...', 1205, 'HY000')
#1 src/XF/Db/Mysqli/Statement.php(77): XF\Db\Mysqli\Statement->getException('MySQL query err...', 1205, 'HY000')
#2 src/XF/Db/AbstractAdapter.php(94): XF\Db\Mysqli\Statement->execute()
#3 src/XF/Db/AbstractAdapter.php(322): XF\Db\AbstractAdapter->query('UPDATE `xf_use...', Array)
#4 src/XF/Mvc/Entity/Entity.php(1515): XF\Db\AbstractAdapter->update('xf_user', Array, 'user_id = 518...')
#5 src/XF/Mvc/Entity/Entity.php(1242): XF\Mvc\Entity\Entity->_saveToSource()
#6 src/XF/ControllerPlugin/Login.php(298): XF\Mvc\Entity\Entity->save()
#7 src/XF/ControllerPlugin/Login.php(275): XF\ControllerPlugin\Login->lastActivityUpdate()
#8 src/XF/Pub/Controller/Logout.php(21): XF\ControllerPlugin\Login->logoutVisitor()
#9 src/XF/Mvc/Dispatcher.php(350): XF\Pub\Controller\Logout->actionIndex(Object(XF\Mvc\ParameterBag))
#10 src/XF/Mvc/Dispatcher.php(257): XF\Mvc\Dispatcher->dispatchClass('XF:Logout', 'Index', Object(XF\Mvc\RouteMatch), Object(XF\Pub\Controller\Logout), NULL)
#11 src/XF/Mvc/Dispatcher.php(113): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(XF\Pub\Controller\Logout), NULL)
#12 src/XF/Mvc/Dispatcher.php(55): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#13 src/XF/App.php(2300): XF\Mvc\Dispatcher->run()
#14 src/XF.php(464): XF\App->run()
#15 index.php(20): XF::runApp('XF\\Pub\\App')
#16 {main}

Status der Anfrage​

array(4) {
["url"] => string(56) "/logout/?t=1602419584%2C929656fa71c3c55b2d9076de66ca37c7"
["referrer"] => string(27) "xxxxxxx"
["_GET"] => array(1) {
["t"] => string(43) "1602419584,929656fa71c3c55b2d9076de66ca37c7"
}
["_POST"] => array(0) {
}
}
 
Solution
Yeah, that's generally beyond the scope of what the spam cleaner is expecting to delete. The batch thread tool might help in the control panel. The alternative involves inline moderation on the search results for the user's contributions. Saying all that, deleting all of a user's contributions (assuming this is a legitimate user and not a spammer that was able to run while for an extended period of time) can completely destroy existing threads. You might consider the option to delete the user but to change the name on all the content at the same time, so that the content is there but no longer attached to his name.
And...

  • XF\Db\DeadlockException: MySQL query error [1213]: Deadlock found when trying to get lock; try restarting transaction

  • src/XF/Db/AbstractStatement.php:228
  • Generiert von: Rooster94

  • 11. Oktober 2020 um 14:44

Stack-Trace​

UPDATE xf_forum SET message_count = ?, last_post_date = ?, last_post_id = ?, last_post_user_id = ?, last_post_username = ?, last_thread_id = ?, last_thread_title = ? WHERE node_id = 374
------------

#0 src/XF/Db/Mysqli/Statement.php(196): XF\Db\AbstractStatement->getException('MySQL query err...', 1213, '40001')
#1 src/XF/Db/Mysqli/Statement.php(77): XF\Db\Mysqli\Statement->getException('MySQL query err...', 1213, '40001')
#2 src/XF/Db/AbstractAdapter.php(94): XF\Db\Mysqli\Statement->execute()
#3 src/XF/Db/AbstractAdapter.php(322): XF\Db\AbstractAdapter->query('UPDATE `xf_for...', Array)
#4 src/XF/Mvc/Entity/Entity.php(1515): XF\Db\AbstractAdapter->update('xf_forum', Array, 'node_id = 374')
#5 src/XF/Mvc/Entity/Entity.php(1242): XF\Mvc\Entity\Entity->_saveToSource()
#6 src/XF/Entity/Thread.php(1360): XF\Mvc\Entity\Entity->save()
#7 src/XF/Entity/Thread.php(1164): XF\Entity\Thread->updateForumRecord()
#8 src/XF/Mvc/Entity/Entity.php(1266): XF\Entity\Thread->_postSave()
#9 src/XF/Entity/Post.php(624): XF\Mvc\Entity\Entity->save()
#10 src/XF/Entity/Post.php(582): XF\Entity\Post->updateThreadRecord()
#11 src/XF/Mvc/Entity/Entity.php(1266): XF\Entity\Post->_postSave()
#12 src/XF/Service/Thread/Replier.php(199): XF\Mvc\Entity\Entity->save(true, false)
#13 src/XF/Service/ValidateAndSavableTrait.php(40): XF\Service\Thread\Replier->_save()
#14 src/XF/Pub/Controller/Thread.php(598): XF\Service\Thread\Replier->save()
#15 src/XF/Mvc/Dispatcher.php(350): XF\Pub\Controller\Thread->actionAddReply(Object(XF\Mvc\ParameterBag))
#16 src/XF/Mvc/Dispatcher.php(257): XF\Mvc\Dispatcher->dispatchClass('XF:Thread', 'AddReply', Object(XF\Mvc\RouteMatch), Object(XFMG\XF\Pub\Controller\Thread), NULL)
#17 src/XF/Mvc/Dispatcher.php(113): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(XFMG\XF\Pub\Controller\Thread), NULL)
#18 src/XF/Mvc/Dispatcher.php(55): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#19 src/XF/App.php(2300): XF\Mvc\Dispatcher->run()
#20 src/XF.php(464): XF\App->run()
#21 index.php(20): XF::runApp('XF\\Pub\\App')
#22 {main}

Status der Anfrage​

array(4) {
["url"] => string(83) "/threads/m%C3%BCnster-pop-up-freizeitpark-10-10-%E2%80%9325-10-2020.52532/add-reply"
["referrer"] => string(106)
["_GET"] => array(0) {
}
["_POST"] => array(10) {
["message_html"] => string(67) "<p>[]A0Rlm9UTTyI[/MEDIA]</p><p><br>Hier mal ein Fazit :)</p>"
["attachment_hash"] => string(32) "82c7567bc313bcefc1f66876cb5ef539"
["attachment_hash_combined"] => string(87) "{"type":"post","context":{"thread_id":52532},"hash":"82c7567bc313bcefc1f66876cb5ef539"}"
["last_date"] => string(10) "1602409676"
["last_known_date"] => string(10) "1602409676"
["load_extra"] => string(1) "1"
["_xfToken"] => string(8) "********"
["_xfRequestUri"] => string(80) "/threads/m%C3%BCnster-pop-up-freizeitpark-10-10-%E2%80%9325-10-2020.52532/page-2"
["_xfWithData"] => string(1) "1"
["_xfResponseType"] => string(4) "json"
}
}
 
Those errors may be related, though they're not actually the spam cleaner request as far as I can tell. To a degree, in certain cases, they can be expected.

How much content are you cleaning? The spam cleaner isn't expecting a lot of content (likely no more than something in the 10s of threads/posts at most). If there's a large amount, things may need to be removed in parts or by using the batch thread tools in the control panel.
 
Yeah, that's generally beyond the scope of what the spam cleaner is expecting to delete. The batch thread tool might help in the control panel. The alternative involves inline moderation on the search results for the user's contributions. Saying all that, deleting all of a user's contributions (assuming this is a legitimate user and not a spammer that was able to run while for an extended period of time) can completely destroy existing threads. You might consider the option to delete the user but to change the name on all the content at the same time, so that the content is there but no longer attached to his name.
 
Solution
Top Bottom