mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #53959
[Bug 1829943] [NEW] Error Deleting Instution Due to Foreign Key Constraint with View Table
Public bug reported:
Mahara: 19.04.0
OS: Linux
DB: Postgres
Browser: FF
We have an institution which no longer has any users. When trying to
delete it, it fails due to the foreign key constraint with the view
table - which now has the institution field.
Call stack (most recent first):
log_message("Array to string conversion", 8, true, true, "/var/www/mahara/htdocs/lib/adodb/adodb...", 45) at /var/www/mahara/htdocs/lib/errors.php:520
error(8, "Array to string conversion", "/var/www/mahara/htdocs/lib/adodb/adodb...", 45, array(size 7)) at /var/www/mahara/htdocs/lib/adodb/adodb-exceptions.inc.php:45
ADODB_Exception->__construct("postgres8", "adodb_throw", -1, "ERROR: update or delete on table "host" violates ...", "DELETE FROM "host" WHERE "institution" = ? ", array(size 1), object(ADODB_postgres8)) at /var/www/mahara/htdocs/lib/adodb/adodb-exceptions.inc.php:80
adodb_throw("postgres8", "adodb_throw", -1, "ERROR: update or delete on table "host" violates ...", "DELETE FROM "host" WHERE "institution" = ? ", array(size 1), object(ADODB_postgres8)) at /var/www/mahara/htdocs/lib/adodb/adodb.inc.php:310
ADODB_TransMonitor("postgres8", "adodb_throw", -1, "ERROR: update or delete on table "host" violates ...", "DELETE FROM "host" WHERE "institution" = ? ", array(size 1), object(ADODB_postgres8)) at /var/www/mahara/htdocs/lib/adodb/adodb.inc.php:1281
ADOConnection->_Execute("DELETE FROM "host" WHERE "institution" = ? ", array(size 1)) at /var/www/mahara/htdocs/lib/adodb/adodb.inc.php:1241
ADOConnection->Execute("DELETE FROM "host" WHERE "institution" = ? ", array(size 1)) at /var/www/mahara/htdocs/lib/dml.php:981
delete_records("host", "institution", "mytest") at /var/www/mahara/htdocs/admin/users/institutions.php:175
delete_submit(object(Pieform), array(size 4)) at /var/www/mahara/htdocs/lib/pieforms/pieform.php:544
Pieform->__construct(array(size 2)) at /var/www/clients/htdocs/lib/pieforms/pieform.php:166
Pieform::process(array(size 2)) at /var/www/clients/htdocs/lib/mahara.php:5379
pieform(array(size 2)) at /var/www/mahara/htdocs/admin/users/institutions.php:217
[WAR] 55 (lib/errors.php:858) Failed to get a recordset: postgres8 error: [-1: ERROR: update or delete on table "host" violates foreign key constraint "view_sub2_fk" on table "view"
DETAIL: Key (wwwroot)=(https://mytest.com.au) is still referenced from table "view".] in adodb_throw(DELETE FROM "host" WHERE "institution" = ? , Array)Command was: DELETE FROM "host" WHERE "institution" = ? and values was (0:mytest)
There are records in the view table that have submitted pages to this
institution. It's setup with XML-RPC with a Moodle.
** Affects: mahara
Importance: Undecided
Status: New
--
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/1829943
Title:
Error Deleting Instution Due to Foreign Key Constraint with View Table
Status in Mahara:
New
Bug description:
Mahara: 19.04.0
OS: Linux
DB: Postgres
Browser: FF
We have an institution which no longer has any users. When trying to
delete it, it fails due to the foreign key constraint with the view
table - which now has the institution field.
Call stack (most recent first):
log_message("Array to string conversion", 8, true, true, "/var/www/mahara/htdocs/lib/adodb/adodb...", 45) at /var/www/mahara/htdocs/lib/errors.php:520
error(8, "Array to string conversion", "/var/www/mahara/htdocs/lib/adodb/adodb...", 45, array(size 7)) at /var/www/mahara/htdocs/lib/adodb/adodb-exceptions.inc.php:45
ADODB_Exception->__construct("postgres8", "adodb_throw", -1, "ERROR: update or delete on table "host" violates ...", "DELETE FROM "host" WHERE "institution" = ? ", array(size 1), object(ADODB_postgres8)) at /var/www/mahara/htdocs/lib/adodb/adodb-exceptions.inc.php:80
adodb_throw("postgres8", "adodb_throw", -1, "ERROR: update or delete on table "host" violates ...", "DELETE FROM "host" WHERE "institution" = ? ", array(size 1), object(ADODB_postgres8)) at /var/www/mahara/htdocs/lib/adodb/adodb.inc.php:310
ADODB_TransMonitor("postgres8", "adodb_throw", -1, "ERROR: update or delete on table "host" violates ...", "DELETE FROM "host" WHERE "institution" = ? ", array(size 1), object(ADODB_postgres8)) at /var/www/mahara/htdocs/lib/adodb/adodb.inc.php:1281
ADOConnection->_Execute("DELETE FROM "host" WHERE "institution" = ? ", array(size 1)) at /var/www/mahara/htdocs/lib/adodb/adodb.inc.php:1241
ADOConnection->Execute("DELETE FROM "host" WHERE "institution" = ? ", array(size 1)) at /var/www/mahara/htdocs/lib/dml.php:981
delete_records("host", "institution", "mytest") at /var/www/mahara/htdocs/admin/users/institutions.php:175
delete_submit(object(Pieform), array(size 4)) at /var/www/mahara/htdocs/lib/pieforms/pieform.php:544
Pieform->__construct(array(size 2)) at /var/www/clients/htdocs/lib/pieforms/pieform.php:166
Pieform::process(array(size 2)) at /var/www/clients/htdocs/lib/mahara.php:5379
pieform(array(size 2)) at /var/www/mahara/htdocs/admin/users/institutions.php:217
[WAR] 55 (lib/errors.php:858) Failed to get a recordset: postgres8 error: [-1: ERROR: update or delete on table "host" violates foreign key constraint "view_sub2_fk" on table "view"
DETAIL: Key (wwwroot)=(https://mytest.com.au) is still referenced from table "view".] in adodb_throw(DELETE FROM "host" WHERE "institution" = ? , Array)Command was: DELETE FROM "host" WHERE "institution" = ? and values was (0:mytest)
There are records in the view table that have submitted pages to this
institution. It's setup with XML-RPC with a Moodle.
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1829943/+subscriptions
Follow ups
-
[Bug 1829943] Re: Error deleting institution due to foreign key constraint with view table
From: Robert Lyon, 2020-04-29
-
[Bug 1829943] Re: Error deleting institution due to foreign key constraint with view table
From: Cecilia Vela Gurovic, 2020-04-29
-
[Bug 1829943] Re: Error deleting institution due to foreign key constraint with view table
From: Cecilia Vela Gurovic, 2019-11-12
-
[Bug 1829943] Re: Error deleting institution due to foreign key constraint with view table
From: Cecilia Vela Gurovic, 2019-11-12
-
[Bug 1829943] A change has been merged
From: Mahara Bot, 2019-11-09
-
[Bug 1829943] Re: Error deleting institution due to foreign key constraint with view table
From: Robert Lyon, 2019-11-09
-
[Bug 1829943] A patch has been submitted for review
From: Mahara Bot, 2019-11-09
-
[Bug 1829943] A change has been merged
From: Mahara Bot, 2019-11-09
-
[Bug 1829943] A patch has been submitted for review
From: Mahara Bot, 2019-11-09
-
[Bug 1829943] A change has been merged
From: Mahara Bot, 2019-11-09
-
[Bug 1829943] Re: Error deleting institution due to foreign key constraint with view table
From: Rangi Daymond, 2019-11-08
-
[Bug 1829943] Re: Error deleting institution due to foreign key constraint with view table
From: Robert Lyon, 2019-10-31
-
[Bug 1829943] Re: Error deleting institution due to foreign key constraint with view table
From: Cecilia Vela Gurovic, 2019-10-31
-
[Bug 1829943] Re: Error deleting institution due to foreign key constraint with view table
From: Kristina Hoeppner, 2019-10-12
-
[Bug 1829943] A patch has been submitted for review
From: Mahara Bot, 2019-10-11
-
[Bug 1829943] Re: Error Deleting Instution Due to Foreign Key Constraint with View Table
From: Cecilia Vela Gurovic, 2019-10-11
-
[Bug 1829943] Re: Error Deleting Instution Due to Foreign Key Constraint with View Table
From: Cecilia Vela Gurovic, 2019-07-12
-
[Bug 1829943] Re: Error Deleting Instution Due to Foreign Key Constraint with View Table
From: Kristina Hoeppner, 2019-05-23
-
[Bug 1829943] Re: Error Deleting Instution Due to Foreign Key Constraint with View Table
From: Ghada El-Zoghbi, 2019-05-22