Reviewed: https://reviews.mahara.org/11982 Committed: https://git.mahara.org/mahara/mahara/commit/48a1a8a3eebd4d1aa4eb8118b52ed993b0ea2ea8 Submitter: Robert Lyon ([email protected]) Branch: 20.04_STABLE
commit 48a1a8a3eebd4d1aa4eb8118b52ed993b0ea2ea8 Author: Dianne Tennent <[email protected]> Date: Wed Sep 8 14:30:20 2021 +1200 Bug 1940033: Now able to delete an account when there is a cover image on a collection Change-Id: Icc3a6aba4483137f18390b49976a1ffcabd7637a (cherry picked from commit d8efdf5a6bd6cc74daceb724884041ec3ae96d99) -- You received this bug notification because you are a member of Mahara Contributors, which is subscribed to Mahara. Matching subscriptions: mahara-contributors https://bugs.launchpad.net/bugs/1940033 Title: Unable to delete account when they have a collection with a cover image Status in Mahara: Fix Committed Status in Mahara 20.04 series: Fix Committed Status in Mahara 20.10 series: Fix Committed Status in Mahara 21.04 series: Fix Committed Status in Mahara 21.10 series: Fix Committed Bug description: We get ERROR: update or delete on table "artefact" violates foreign key constraint "coll_cov_fk" on table "collection" To test: 1) New site 2) Log in as admin and create a new user 3) Masquerade as new user 4) add a page 5) add a collection and add a cover image to the collection 6) add page to collection 7) stop masquerading (be admin again) 8) click on the 'Suspend or delete this account' and chose delete account Expected result account is deleted Actual outcome get error The problem is the coverimage artefact id is still in the collection table when we try to delete the artefact. In the delete_user() function the deletion of artefacts happens before the deletion of collections We should maybe try those the other way around To manage notifications about this bug go to: https://bugs.launchpad.net/mahara/+bug/1940033/+subscriptions _______________________________________________ Mailing list: https://launchpad.net/~mahara-contributors Post to : [email protected] Unsubscribe : https://launchpad.net/~mahara-contributors More help : https://help.launchpad.net/ListHelp

