mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #56843
[Bug 1852584] Re: Cannot delete a group collection if already pushed to users
The error message I get is:
[WAR] cb (lib/adodb/adodb-exceptions.inc.php:45) Array to string conversion
Call stack (most recent first):
log_message("Array to string conversion", 8, true, true, "/var/www/master-dev-prod-mahara/releases/201911130...", 45) at /var/www/master-dev-prod-mahara/releases/20191113004341/lib/errors.php:521
error(8, "Array to string conversion", "/var/www/master-dev-prod-mahara/releases/201911130...", 45, array(size 7)) at /var/www/master-dev-prod-mahara/releases/20191113004341/lib/adodb/adodb-exceptions.inc.php:45
ADODB_Exception->__construct("postgres8", "adodb_throw", -1, "ERROR: update or delete on table "collection" vio...", "DELETE FROM "collection" WHERE "id" = ? ", array(size 1), object(ADODB_postgres8)) at /var/www/master-dev-prod-mahara/releases/20191113004341/lib/adodb/adodb-exceptions.inc.php:80
adodb_throw("postgres8", "adodb_throw", -1, "ERROR: update or delete on table "collection" vio...", "DELETE FROM "collection" WHERE "id" = ? ", array(size 1), object(ADODB_postgres8)) at /var/www/master-dev-prod-mahara/releases/20191113004341/lib/adodb/adodb.inc.php:310
ADODB_TransMonitor("postgres8", "adodb_throw", -1, "ERROR: update or delete on table "collection" vio...", "DELETE FROM "collection" WHERE "id" = ? ", array(size 1), object(ADODB_postgres8)) at /var/www/master-dev-prod-mahara/releases/20191113004341/lib/adodb/adodb.inc.php:1281
ADOConnection->_Execute("DELETE FROM "collection" WHERE "id" = ? ", array(size 1)) at /var/www/master-dev-prod-mahara/releases/20191113004341/lib/adodb/adodb.inc.php:1241
ADOConnection->Execute("DELETE FROM "collection" WHERE "id" = ? ", array(size 1)) at /var/www/master-dev-prod-mahara/releases/20191113004341/lib/dml.php:1041
delete_records("collection", "id", "12") at /var/www/master-dev-prod-mahara/releases/20191113004341/lib/collection.php:159
Collection->delete() at /var/www/master-dev-prod-mahara/releases/20191113004341/collection/delete.php:90
deletecollection_submit(object(Pieform), array(size 2)) at /var/www/master-dev-prod-mahara/releases/20191113004341/lib/pieforms/pieform.php:546
Pieform->__construct(array(size 3)) at /var/www/master-dev-prod-mahara/releases/20191113004341/lib/pieforms/pieform.php:168
Pieform::process(array(size 3)) at /var/www/master-dev-prod-mahara/releases/20191113004341/lib/mahara.php:5432
pieform(array(size 3)) at /var/www/master-dev-prod-mahara/releases/20191113004341/collection/delete.php:76
[WAR] cb (lib/errors.php:859) Failed to get a recordset: postgres8 error: [-1: ERROR: update or delete on table "collection" violates foreign key constraint "exis_col_fk" on table "existingcopy"
DETAIL: Key (id)=(12) is still referenced from table "existingcopy".] in adodb_throw(DELETE FROM "collection" WHERE "id" = ? , Array)Command was: DELETE FROM "collection" WHERE "id" = ? and values was (0:12)
Call stack (most recent first):
log_message("Failed to get a recordset: postgres8 error: [-1: E...", 8, true, true) at /var/www/master-dev-prod-mahara/releases/20191113004341/lib/errors.php:95
log_warn("Failed to get a recordset: postgres8 error: [-1: E...") at /var/www/master-dev-prod-mahara/releases/20191113004341/lib/errors.php:859
SQLException->__construct("Failed to get a recordset: postgres8 error: [-1: E...") at /var/www/master-dev-prod-mahara/releases/20191113004341/lib/dml.php:1044
delete_records("collection", "id", "12") at /var/www/master-dev-prod-mahara/releases/20191113004341/lib/collection.php:159
Collection->delete() at /var/www/master-dev-prod-mahara/releases/20191113004341/collection/delete.php:90
deletecollection_submit(object(Pieform), array(size 2)) at /var/www/master-dev-prod-mahara/releases/20191113004341/lib/pieforms/pieform.php:546
Pieform->__construct(array(size 3)) at /var/www/master-dev-prod-mahara/releases/20191113004341/lib/pieforms/pieform.php:168
Pieform::process(array(size 3)) at /var/www/master-dev-prod-mahara/releases/20191113004341/lib/mahara.php:5432
pieform(array(size 3)) at /var/www/master-dev-prod-mahara/releases/20191113004341/collection/delete.php:76
[WAR] cb (lib/dml.php:1044) Failed to get a recordset: postgres8 error: [-1: ERROR: update or delete on table "collection" violates foreign key constraint "exis_col_fk" on table "existingcopy"
DETAIL: Key (id)=(12) is still referenced from table "existingcopy".] in adodb_throw(DELETE FROM "collection" WHERE "id" = ? , Array)Command was: DELETE FROM "collection" WHERE "id" = ? and values was (0:12)
Call stack (most recent first):
delete_records("collection", "id", "12") at /var/www/master-dev-prod-mahara/releases/20191113004341/lib/collection.php:159
Collection->delete() at /var/www/master-dev-prod-mahara/releases/20191113004341/collection/delete.php:90
deletecollection_submit(object(Pieform), array(size 2)) at /var/www/master-dev-prod-mahara/releases/20191113004341/lib/pieforms/pieform.php:546
Pieform->__construct(array(size 3)) at /var/www/master-dev-prod-mahara/releases/20191113004341/lib/pieforms/pieform.php:168
Pieform::process(array(size 3)) at /var/www/master-dev-prod-mahara/releases/20191113004341/lib/mahara.php:5432
pieform(array(size 3)) at /var/www/master-dev-prod-mahara/releases/20191113004341/collection/delete.php:76
** Also affects: mahara/19.04
Importance: Undecided
Status: New
** Also affects: mahara/20.04
Importance: Undecided
Status: New
** Also affects: mahara/19.10
Importance: Undecided
Status: New
** Changed in: mahara/20.04
Status: New => Confirmed
** Changed in: mahara/19.10
Status: New => Confirmed
** Changed in: mahara/19.04
Status: New => Confirmed
** Changed in: mahara/20.04
Importance: Undecided => High
** Changed in: mahara/19.10
Importance: Undecided => High
** Changed in: mahara/19.04
Importance: Undecided => High
** Changed in: mahara/20.04
Milestone: None => 20.04.0
** Changed in: mahara/19.10
Milestone: None => 19.10.2
** Changed in: mahara/19.04
Milestone: None => 19.04.4
--
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/1852584
Title:
Cannot delete a group collection if already pushed to users
Status in Mahara:
Confirmed
Status in Mahara 19.04 series:
Confirmed
Status in Mahara 19.10 series:
Confirmed
Status in Mahara 20.04 series:
Confirmed
Bug description:
As a group admin I should be able to delete a collection in a group,
but for some reason I can't if I have pushed it to group users via
"Copy for existing group members". Deletion works fine if I haven't
already shared it.
To replicate,
- In a group, set up a collection and in the access settings select "Copy for existing group members"
- Then go to the group's pages and collections page
- Then go to 'More options' on the collection (bottom right)
- Then select the delete/bin icon and accept the usual 'pages won't be deleted' message
You then get an error message:
Mahara: Site unavailable
A nonrecoverable error occurred. This probably means you have encountered a bug in the system
*******************************
I discovered this in a new client's out of the box mahara 19.04.1 and can replicate this in our own 19.04 demo site.
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1852584/+subscriptions
References