XF 1.2 Error while cleaning spam


Active member

I wanted to clean a spammer (permanently delete all threads/posts, banning etc.) using Spam Cleaner. However, I am getting the below error. Can you please help?

Mysqli statement execute error : Duplicate entry '18' for key 'PRIMARY'
  1. Zend_Db_Statement_Mysqli->_execute() in Zend/Db/Statement.php at line 297
  2. Zend_Db_Statement->execute() in Zend/Db/Adapter/Abstract.php at line 479
  3. Zend_Db_Adapter_Abstract->query() in Zend/Db/Adapter/Abstract.php at line 574
  4. Zend_Db_Adapter_Abstract->insert() in XenForo/DataWriter.php at line 1612
  5. XenForo_DataWriter->_insert() in XenForo/DataWriter.php at line 1601
  6. XenForo_DataWriter->_save() in XenForo/DataWriter.php at line 1393
  7. XenForo_DataWriter->save() in XenForo/Model/User.php at line 2375
  8. XenForo_Model_User->ban() in XenForo/Model/SpamCleaner.php at line 159
  9. XenForo_Model_SpamCleaner->_banUser() in XenForo/Model/SpamCleaner.php at line 27
  10. XenForo_Model_SpamCleaner->cleanUp() in XenForo/ControllerPublic/SpamCleaner.php at line 53
  11. XenForo_ControllerPublic_SpamCleaner->actionIndex() in XenForo/FrontController.php at line 337
  12. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
  13. XenForo_FrontController->run() in /home/talkknow/migrationdesk.com/index.php at line 13


Active member
Okay, I guess I found the issue.. the user was already deleted but didn't have confirmation. In the meantime I tried to clean again. Sorry for bothering.