mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #13484
[Bug 1158086] Re: Forum: error after deleting a post that is the child of another deleted post
Hmm, now when I delete a forum post where the parent still is there I
get an error:
Post deleted successfully
[WAR] d2 (lib/errors.php:749) Failed to get a recordset: postgres7 error: [-1: ERROR: bind message supplies 3 parameters, but prepared statement "" requires 1] in EXECUTE("SELECT id, deleted, parent FROM "interaction_forum_post" WHERE "id" = ? LIMIT 2")
Command was: SELECT id, deleted, parent FROM "interaction_forum_post" WHERE "id" = ? and values was (7,,)
Call stack (most recent first):
log_message("Failed to get a recordset: postgres7 error: [-1: E...", 8, true, true) at /home/robertl/htdocs/mahara-devel/mahara/htdocs/lib/errors.php:109
log_warn("Failed to get a recordset: postgres7 error: [-1: E...") at /home/robertl/htdocs/mahara-devel/mahara/htdocs/lib/errors.php:749
SQLException->__construct("Failed to get a recordset: postgres7 error: [-1: E...") at /home/robertl/htdocs/mahara-devel/mahara/htdocs/lib/dml.php:492
get_recordset_sql("SELECT id, deleted, parent FROM "interaction_forum...", array(size 3), 0, 2) at /home/robertl/htdocs/mahara-devel/mahara/htdocs/lib/dml.php:333
get_record_sql("SELECT id, deleted, parent FROM "interaction_forum...", array(size 3)) at /home/robertl/htdocs/mahara-devel/mahara/htdocs/lib/dml.php:310
get_record("interaction_forum_post", "id", "7", "", "", "", "", "id, deleted, parent") at /home/robertl/htdocs/mahara-devel/mahara/htdocs/interaction/forum/deletepost.php:123
deletepost_submit(object(Pieform), array(size 5)) at Unknown:0
call_user_func_array("deletepost_submit", array(size 2)) at /home/robertl/htdocs/mahara-devel/mahara/htdocs/lib/pieforms/pieform.php:528
Pieform->__construct(array(size 4)) at /home/robertl/htdocs/mahara-devel/mahara/htdocs/lib/pieforms/pieform.php:170
Pieform::process(array(size 4)) at /home/robertl/htdocs/mahara-devel/mahara/htdocs/lib/pieforms/pieform.php:71
pieform(array(size 4)) at /home/robertl/htdocs/mahara-devel/mahara/htdocs/interaction/forum/deletepost.php:108
I've added a fix here:
https://reviews.mahara.org/#/c/2502/
** Changed in: mahara
Status: Fix Committed => In Progress
--
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/1158086
Title:
Forum: error after deleting a post that is the child of another
deleted post
Status in Mahara ePortfolio:
In Progress
Bug description:
If you delete the child of a deleted post, it deletes successfully but
then you're sent to a page that says "Not found. The page you are
looking for could not be found. The post with ID '21' is not found or
deleted!'
It appears that what's happening is that after you delete a post it
tries to send you to the URL for that post's parent. If the post's
parent is deleted, then you get this error.
To replicate:
1. Create a forum topic
2. In that topic, post a reply "A"
3. Then post a reply to A, called "B"
4. Delete A
5. Delete B
Expected result: You should delete B, and then see the forum with A &
B deleted
Actual result: You successfully delete B, but then you see a "Not
found" error page.
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1158086/+subscriptions