Details
-
Bug
-
Resolution: Fixed
-
Minor
-
COmanage Registry 4.1.0 (Quiet Quay)
-
CentOS 7, PHP 8.2.1, PostgreSQL 15, Registry develop branch (commit e10eff4)
Description
Attempts to delete a CO containing person role records with non-null manager and/or sponsor associations are failing due to a foreign key violation regardless of whether the delete request is initiated manually through the UI or via a REST API call. I’ve included a stack trace showing a cm_co_person_roles_manager_co_person_id_fkey violation from a failed REST API call below, and I’ve attached a screenshot showing a cm_co_per_roles_sponsor_co_person_id_fkey violation in a failed garbage collection job.
2023-01-25 17:20:52 Error: [PDOException] SQLSTATE[23503]: Foreign key violation: 7 ERROR: update or delete on table "cm_co_people" violates foreign key constraint "cm_co_person_roles_manager_co_person_id_fkey" on table "cm_co_person_roles"
DETAIL: Key (id)=(97365) is still referenced from table "cm_co_person_roles".
Request URL: /registry/cos/55.json
Stack Trace:
#0 /opt/comanage/comanage-registry-develop/lib/Cake/Model/Datasource/DboSource.php(502): PDOStatement->execute()
#1 /opt/comanage/comanage-registry-develop/lib/Cake/Model/Datasource/DboSource.php(468): DboSource->_execute()
#2 /opt/comanage/comanage-registry-develop/lib/Cake/Model/Datasource/DboSource.php(2252): DboSource->execute()
#3 /opt/comanage/comanage-registry-develop/lib/Cake/Model/Model.php(2723): DboSource->delete()
#4 /opt/comanage/comanage-registry-develop/app/Model/AppModel.php(799): Model->delete()
#5 /opt/comanage/comanage-registry-develop/lib/Cake/Model/Model.php(2782): AppModel->delete()
#6 /opt/comanage/comanage-registry-develop/lib/Cake/Model/Model.php(2703): Model->_deleteDependent()
#7 /opt/comanage/comanage-registry-develop/app/Model/AppModel.php(799): Model->delete()
#8 /opt/comanage/comanage-registry-develop/app/Model/Co.php(298): AppModel->delete()
#9 /opt/comanage/comanage-registry-develop/app/Controller/StandardController.php(444): Co->delete()
#10 [internal function]: StandardController->delete()
#11 /opt/comanage/comanage-registry-develop/lib/Cake/Controller/Controller.php(499): ReflectionMethod->invokeArgs()
Attachments
Issue Links
- is related to
-
CO-2380 Errors when deleting non-empty CO
-
- Resolved
-