Closed drjekyll closed 6 years ago
You're right.
Place $user->providers()->delete(); before the user delete call and it should fix it.
Wrap it in a transaction for good measure.
Will fix on next release.
Super! That took care of it. Thanks much.
Oops, maybe I shouldn't be the one to close it until after the fix is in. This way others can see it more easily. Sorry if I get the etiquette wrong...
Fixed in release in like an hour.
An exception occurred while executing 'DELETE FROM AttributeKeys WHERE akID = ?' with params [110]: SQLSTATE[23000]: Integrity constraint violation: 1451 Cannot delete or update a parent row: a foreign key constraint fails (thermote_v58
.atEmptySettings
, CONSTRAINT FK_ED1BF189B6561A7E
FOREIGN KEY (akID
) REFERENCES AttributeKeys
(akID
))
I uninstall my package in concrete5.7 , then this error is occurred, could you give solutions?
Cloud9 development environment with MySQL 5.7.19 Laravel Boilerplate 5.5 - fresh clone from GitHub Install, configure, test basic operation. Add Facebook Socialite provider infromation. Navigate to register, choose Facebook login Login completes and new user is created. Login as admin@admin.com Navigate to user management and delete the just created Facebook user The soft delete works as expected. Go to deleted user and try to permanently delete the user.
SQLSTATE[23000]: Integrity constraint violation: 1451 Cannot delete or update a parent row: a foreign key constraint fails (
c9
.social_accounts
, CONSTRAINTsocial_accounts_user_id_foreign
FOREIGN KEY (user_id
) REFERENCESusers
(id
)) (SQL: delete fromusers
whereid
= 4)Stack trace (if that's what you call it in PHP) leads to forceDelete() function in app/Repositories/Backend/Auth/UserRepository.php
Permanent deleting a user created through the regular registration process works as expected.
Regards, mark