Edit forum post error if parent is deleted

Bug #1204309 reported by Robert Lyon
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Medium
Nitish Bezzala

Bug Description

If you have:
1. a forum post and then
2. add a child post to it then
3. add a grandchild post to the child post
4. add a great-grandchild post to the grandchild post
5. delete child post

You now can't edit the grandchild post even though it has an edit button because it's 'parent' is deleted.

The file interaction/forum/editpost.php is the page that throws up the error:

   Not found
   The page you are looking for could not be found.

   Could not find post with id 2

You can however edit the great-grandchild post as it has a viable 'parent'.

Either you should be able to edit the child of a deleted parent - or you shouldn't be given an edit button if you can't.

My 2 cents believes you should be able to edit an orphan child as not having a parent is irrelevant to the text of the post that the child displays.

Tags: forums
Revision history for this message
Aaron Wells (u-aaronw) wrote :

Agreed. I didn't realize we'd made the children of deleted posts uneditable.

Changed in mahara:
assignee: nobody → Nitish Bezzala (nbezzala)
Revision history for this message
Nitish Bezzala (nbezzala) wrote :
Changed in mahara:
status: Confirmed → In Progress
Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/2479
Committed: http://gitorious.org/mahara/mahara/commit/036d82fb14a12f2f35c202a7e5d278d480541f30
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit 036d82fb14a12f2f35c202a7e5d278d480541f30
Author: Nitish Bezzala <email address hidden>
Date: Sun Sep 8 05:19:41 2013 -0500

Edit forum post error if parent is deleted (Bug 1204309)

For Edit post, we can use the parent post to get the group or the topic details
even if the parent has the deleted flag set to 1. I am checking that the parent
is not deleted only for add post.

Since the get parent query is common to both add and edit post, I changed it to
search for a parent ignoring the deleted flag.

Change-Id: Ie0602d940d3c3b97e97159f8bfa540128c7f1f1d
Signed-off-by: Nitish Bezzala <email address hidden>

Revision history for this message
Aaron Wells (u-aaronw) wrote :

Thanks for the patch, Nitish!

Changed in mahara:
status: In Progress → Fix Committed
Aaron Wells (u-aaronw)
Changed in mahara:
milestone: 1.8rc1 → 1.8.0
Aaron Wells (u-aaronw)
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.