Comment 1 for bug 1969693

Revision history for this message
Kristina Hoeppner (kris-hoeppner) wrote :

I created a wishlist item for the special deletion warning, which is a good idea, at bug #1969701.

I confirmed the test instructions and got the problem as well on main.

The warning and stacktrace:

[WAR] 4d (lib/errors.php:853) Failed to get a recordset: postgres9 error: [-1: ERROR: update or delete on table "collection" violates foreign key constraint "colltemp_ori_fk" on table "collection_template"
DETAIL: Key (id)=(1) is still referenced from table "collection_template".] in EXECUTE("DELETE FROM "collection" WHERE "id" = ? ")Command was: DELETE FROM "collection" WHERE "id" = ? and values was (0:1)
Call stack (most recent first):

    log_message("Failed to get a recordset: postgres9 error: [-1: E...", 8, true, true) at /home/kristina/code/mahara/htdocs/lib/errors.php:89
    log_warn("Failed to get a recordset: postgres9 error: [-1: E...") at /home/kristina/code/mahara/htdocs/lib/errors.php:853
    SQLException->__construct("Failed to get a recordset: postgres9 error: [-1: E...") at /home/kristina/code/mahara/htdocs/lib/dml.php:1045
    delete_records("collection", "id", "1") at /home/kristina/code/mahara/htdocs/lib/collection.php:326
    Collection->delete(true) at /home/kristina/code/mahara/htdocs/collection/delete.php:97
    deletecollection_submit(object(Pieform), array(size 2)) at /home/kristina/code/mahara/htdocs/lib/pieforms/pieform.php:577
    Pieform->__construct(array(size 3)) at /home/kristina/code/mahara/htdocs/lib/pieforms/pieform.php:173
    Pieform::process(array(size 3)) at /home/kristina/code/mahara/htdocs/lib/mahara.php:5754
    pieform(array(size 3)) at /home/kristina/code/mahara/htdocs/collection/delete.php:77