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

Error when trying to delete users...

Discussion in 'XenForo Questions and Support' started by AscendancyGaming, Aug 15, 2012.

  1. Ok, we're purging our member list of folks who've applied, had no contact for quite some time, etc. and hadn't any problems deleting them through the ACP, until we got the following error for 4 of them.....

    Server Error

    Mysqli statement execute error : Cannot delete or update a parent row: a foreign key constraint fails (`guilda7_xenforo`.`lpsf_response`, CONSTRAINT `lpsf_response_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `xf_user` (`user_id`))
    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 661
    4. Zend_Db_Adapter_Abstract->delete() in XenForo/DataWriter.php at line 1784
    5. XenForo_DataWriter->_delete() in XenForo/DataWriter.php at line 1737
    6. XenForo_DataWriter->delete() in XenForo/Controller.php at line 918
    7. XenForo_Controller->_deleteData() in XenForo/ControllerAdmin/User.php at line 574
    8. XenForo_ControllerAdmin_User->actionDelete() in XenForo/FrontController.php at line 310
    9. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
    10. XenForo_FrontController->run() in /home/guilda7/public_html/admin.php at line 13
    There is nothing special about these folks, as they're all just applicants who we've not heard from or anything.
    Any idea as to why we cannot remove them?
    Thanks in advance for any help on this!
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    XenForo doesn't use foreign key constraints. You must have added that to your schema. Any particular reason?

    If you don't need the constraints then you can just remove them from your schema.
  3. ragtek

    ragtek Guest

    that's probably a bug in the simple forms addon
  4. Ahh, so if we disable simple forms we can remove them, and then re-enable simple forms?
    HWS likes this.
  5. Tried disabling Simple forms and still get the same error. It's odd because it's only for 4 people. The other 20 we had no problem deleting at all.

    Also, how do I change the Schema? I haven't any idea if we did something inadvertantly.
  6. ragtek

    ragtek Guest

  7. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    I have never used foreign key constraints. I assume they would be accessible in phpmyadmin.

    But ideally you should contact the author of that addon.

Share This Page