Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when deleting a thirdparty having contacts with roles #13968

Closed
atm-maxime opened this issue May 25, 2020 · 0 comments
Closed

Error when deleting a thirdparty having contacts with roles #13968

atm-maxime opened this issue May 25, 2020 · 0 comments

Comments

@atm-maxime
Copy link
Member

Bug

When trying to delete a thirdparty having contacts with roles, the following error occurs :
Cannot delete or update a parent row: a foreign key constraint fails (atm_dolibarr.llx_societe_contacts, CONSTRAINT fk_societe_contacts_fk_socpeople FOREIGN KEY (fk_socpeople) REFERENCES llx_socpeople (rowid))

Environment

  • Version: 11.0.4
  • OS: Linux
  • Web server: Apache/2.4.29 (Ubuntu)
  • PHP: apache2handler 7.2.24-0ubuntu0.18.04.4
  • Database: 5.5.5-10.1.44-MariaDB-0ubuntu0.18.04.1
  • URL(s): /societe/card.php?socid=20531&action=confirm_delete&confirm=yes&token=9fe36851fc402eec607a4c9c64513f18

Expected and actual behavior

The thirdparty and its contacts should be deleted. Currently nothing is deleted because of the error

Steps to reproduce the behavior

  1. Create a thirdparty
  2. Create a contact linked to the thirdparty, assign a role
  3. Go back on the thirdparty card
  4. Try to delete the thirdparty
@atm-maxime atm-maxime changed the title Bug: Error when deleting a thirdparty having contacts with roles May 25, 2020
@FHenry FHenry mentioned this issue May 26, 2020
FHenry pushed a commit to atm-florian/dolibarr that referenced this issue Jun 1, 2020
eldy added a commit that referenced this issue Jun 6, 2020
@eldy eldy closed this as completed in 7ada0de Jun 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant