** Changed in: mahara/1.7 Status: Fix Committed => Fix Released -- You received this bug notification because you are a member of Mahara Contributors, which is subscribed to Mahara. Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it! https://bugs.launchpad.net/bugs/1314440
Title: Deleting an institution which has user's registrations causes error Status in Mahara ePortfolio: Fix Committed Status in Mahara 1.10 series: Fix Committed Status in Mahara 1.7 series: Fix Released Status in Mahara 1.8 series: Fix Released Status in Mahara 1.9 series: Fix Released Bug description: Version: master(1.10) Platform: all When deleting an institution which contains some registrations, I got the following error: [WAR] a6 (lib/errors.php:739) Failed to get a recordset: postgres7 error: [-1: ERROR: update or delete on table "institution" violates foreign key constraint "usrregi_ins_fk" on table "usr_registration" DETAIL: Key (name)=(instone) is still referenced from table "usr_registration".] in adodb_throw(DELETE FROM "institution" WHERE "name" = ? , Array) Command was: DELETE FROM "institution" WHERE "name" = ? and values was (instone) Call stack (most recent first): log_message("Failed to get a recordset: postgres7 error: [-1: E...", 8, true, true) at /home/sonn/code/mahara/master/htdocs/lib/errors.php:95 log_warn("Failed to get a recordset: postgres7 error: [-1: E...") at /home/sonn/code/mahara/master/htdocs/lib/errors.php:739 SQLException->__construct("Failed to get a recordset: postgres7 error: [-1: E...") at /home/sonn/code/mahara/master/htdocs/lib/dml.php:925 delete_records("institution", "name", "instone") at /home/sonn/code/mahara/master/htdocs/admin/users/institutions.php:162 delete_submit(object(Pieform), array(size 4)) at Unknown:0 call_user_func_array("delete_submit", array(size 2)) at /home/sonn/code/mahara/master/htdocs/lib/pieforms/pieform.php:527 Pieform->__construct(array(size 2)) at /home/sonn/code/mahara/master/htdocs/lib/pieforms/pieform.php:162 Pieform::process(array(size 2)) at /home/sonn/code/mahara/master/htdocs/lib/pieforms/pieform.php:71 pieform(array(size 2)) at /home/sonn/code/mahara/master/htdocs/admin/users/institutions.php:185 [WAR] a6 (lib/dml.php:925) Failed to get a recordset: postgres7 error: [-1: ERROR: update or delete on table "institution" violates foreign key constraint "usrregi_ins_fk" on table "usr_registration" DETAIL: Key (name)=(instone) is still referenced from table "usr_registration".] in adodb_throw(DELETE FROM "institution" WHERE "name" = ? , Array) Command was: DELETE FROM "institution" WHERE "name" = ? and values was (instone) Call stack (most recent first): delete_records("institution", "name", "instone") at /home/sonn/code/mahara/master/htdocs/admin/users/institutions.php:162 delete_submit(object(Pieform), array(size 4)) at Unknown:0 call_user_func_array("delete_submit", array(size 2)) at /home/sonn/code/mahara/master/htdocs/lib/pieforms/pieform.php:527 Pieform->__construct(array(size 2)) at /home/sonn/code/mahara/master/htdocs/lib/pieforms/pieform.php:162 Pieform::process(array(size 2)) at /home/sonn/code/mahara/master/htdocs/lib/pieforms/pieform.php:71 pieform(array(size 2)) at /home/sonn/code/mahara/master/htdocs/admin/users/institutions.php:185 To manage notifications about this bug go to: https://bugs.launchpad.net/mahara/+bug/1314440/+subscriptions _______________________________________________ Mailing list: https://launchpad.net/~mahara-contributors Post to : mahara-contributors@lists.launchpad.net Unsubscribe : https://launchpad.net/~mahara-contributors More help : https://help.launchpad.net/ListHelp