XF 2.2 SQL error when deleting user

PatD

Member
Trying to delete a user from our forums and unable. All I can find on these errors is an add-on (Simple forms and/or a Facebook plugin) that we don't use. Any suggestions? Running 2.2.8 with patch 1.

XF\Db\Exception: MySQL query error [1451]: Cannot delete or update a parent row: a foreign key constraint fails (server_xf.xf_user_field_value, CONSTRAINT xf_user_field_value_ibfk_1 FOREIGN KEY (user_id) REFERENCES xf_user (user_id) ON DELETE NO ACTION ON UPDATE NO ACTION) in src/XF/Db/AbstractStatement.php at line 230
  1. XF\Db\AbstractStatement->getException() in src/XF/Db/Mysqli/Statement.php at line 198
  2. XF\Db\Mysqli\Statement->getException() in src/XF/Db/Mysqli/Statement.php at line 79
  3. XF\Db\Mysqli\Statement->execute() in src/XF/Db/AbstractAdapter.php at line 96
  4. XF\Db\AbstractAdapter->query() in src/XF/Db/AbstractAdapter.php at line 291
  5. XF\Db\AbstractAdapter->delete() in src/XF/Mvc/Entity/Entity.php at line 1613
  6. XF\Mvc\Entity\Entity->delete() in src/XF/Service/User/Delete.php at line 71
  7. XF\Service\User\Delete->delete() in src/XF/Admin/Controller/User.php at line 683
  8. XF\Admin\Controller\User->actionDelete() in src/XF/Mvc/Dispatcher.php at line 352
  9. XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 259
  10. XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 115
  11. XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 57
  12. XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2351
  13. XF\App->run() in src/XF.php at line 517
  14. XF::runApp() in admin.php at line 13
 

Brogan

XenForo moderator
Staff member
I am dealing with this via ticket.

The xf_user_field_value table is non standard - it has a constraint which will need to be removed.
 
Top