mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #19883
[Bug 1314440] A change has been merged
Reviewed: https://reviews.mahara.org/3553
Committed: http://gitorious.org/mahara/mahara/commit/5487a3fa1527eff5e49d7e513f745aa1e4de2373
Submitter: Robert Lyon (robertl@xxxxxxxxxxxxxxx)
Branch: 1.7_STABLE
commit 5487a3fa1527eff5e49d7e513f745aa1e4de2373
Author: Son Nguyen <son.nguyen@xxxxxxxxxxxxxxx>
Date: Tue Jun 10 11:53:06 2014 +1200
Delete leftover data not associated to any institution (Bug 1314440)
Another patch for bug 1314440 makes it so that when you delete an
institution, this data gets deleted. This patch cleans up the data
for institutions that were deleted before that patch was merged.
Change-Id: I167001f444a3fd204b12610ca10274d6218d9f96
Signed-off-by: Son Nguyen <son.nguyen@xxxxxxxxxxxxxxx>
--
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
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
References