Forums | Mahara Community

Support /
Can't delete institution - a nonrecoverable error ocurred


anonymous profile picture
Account deleted
Posts: 105

29 June 2010, 7:53

Hi guys,

I just tried to delete an institution we are no longer using. Unfortunately my attempt fails every time with Mahra saying that it retrieved an"nonrecoverable error occured. This probably means you have encountered a bug in the system"

There seems to be a problem with a foreign key constraint in the database. Here is what the error log says:

[29-Jun-2010 14:44:31] [WAR] 1f (lib/dml.php:917) Failed to get a recordset: mysql error: [1451: Cannot delete or update a parent row: a foreign key constraint fails ("social"."mahara_usr", CONSTRAINT "mahara_usr_aut_fk" FOREIGN KEY ("authinstance") REFERENCES "mahara_auth_instance" ("id"))] in adodb_throw(DELETE FROM "mahara_auth_instance"  WHERE "institution" = 'uni' , )
[29-Jun-2010 14:44:31] [WAR] 1f (lib/dml.php:917) Command was: DELETE FROM "mahara_auth_instance"  WHERE "institution" = ?  and values was (uni)
[29-Jun-2010 14:44:31] Call stack (most recent first):
[29-Jun-2010 14:44:31]   * delete_records("auth_instance", "institution", "uni") at /data/web/social/web/social/collabuni/admin/users/institutions.php:106
[29-Jun-2010 14:44:31]   * delete_submit(object(Pieform), array(size 4)) at Unknown:0
[29-Jun-2010 14:44:31]   * call_user_func_array("delete_submit", array(size 2)) at /data/web/social/web/social/collabuni/lib/pieforms/pieform.php:430
[29-Jun-2010 14:44:31]   * Pieform->__construct(array(size 2)) at /data/web/social/web/social/collabuni/lib/pieforms/pieform.php:170
[29-Jun-2010 14:44:31]   * Pieform::process(array(size 2)) at /data/web/social/web/social/collabuni/lib/pieforms/pieform.php:71
[29-Jun-2010 14:44:31]   * pieform(array(size 2)) at /data/web/social/web/social/collabuni/admin/users/institutions.php:133

Is there any workaround for this?

thx Alex

anonymous profile picture
Account deleted
Posts: 808

30 June 2010, 16:22

Alex,

It's probably this bug: https://bugs.launchpad.net/mahara/+bug/526824

To delete the institution, you'll need to find all the users who are using auth instances belonging to that instituion, and change them to something else (probably 'No institution:internal').

But having the institution lying around won't do any harm except for looking untidy on the institutions page.

R.

anonymous profile picture
Account deleted
Posts: 105

01 July 2010, 1:57

Richard,

seems to be the same bug! I commented the Bug report adding some information. Suspending intitutions who are still being used as auth instances is causing problems as well. For now I'll just use the workaround.

thx Alex

3 results