Wrong comment is deleted

Bug #1486763 reported by Kristina Hoeppner
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Critical
Robert Lyon
15.10
Fix Released
Undecided
Unassigned

Bug Description

master 15.10dev

Discovered by Pat:

When you have two comments and want to delete the second one, the first one is actually deleted.

Revision history for this message
Robert Lyon (robertl-9) wrote :

Looking further into this:

The $_POST data has the correct comment id but the $values data being passed to delete_comment_submit() contains the value for the first delete button - so need to find out why the submitted value ($_POST) is not being assigned to the element on post submission

Robert Lyon (robertl-9)
Changed in mahara:
assignee: nobody → Robert Lyon (robertl-9)
Revision history for this message
Robert Lyon (robertl-9) wrote :

Looking even further into this problem - in 15.10 for some reason when you go to delete a comment it passes the $data to pieform process containing the first deletable comment rather than the one you are wanting to delete

Robert Lyon (robertl-9)
Changed in mahara:
status: Confirmed → In Progress
Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "master" branch: https://reviews.mahara.org/5228

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

This also needs to be tested with nested comments turned on.

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

To replicate:

1. Create a page
2. View page in display mode
3. Place comment on page with text "Comment 1"
4. Place comment on page with text "Comment 2"
5. Click delete button for "Comment 2"

Expected result: Comment 2 gets deleted
Actual result: Comment 1 gets deleted

It happens the same with nested replies turned on. (In this case, for step 4, make "Comment 2" be a reply to "Comment 1").

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/5228
Committed: https://git.nzoss.org.nz/mahara/mahara/commit/6da147c195499b7a7538929dc712086ae51c74cf
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit 6da147c195499b7a7538929dc712086ae51c74cf
Author: Robert Lyon <email address hidden>
Date: Mon Sep 7 13:51:47 2015 +1200

Bug 1486763: Now deleting correct comment

Was a problem with the old delete button being an image and so passed
the _x value, which was then checked for.

Changed it so it checks that the submit param exists, which is more
robust

behatnotneeded : problem of finding the row that you just deleted as
all deleted rows have the same 'Comment removed by the author' text

Change-Id: Iea379badd2d364112d107977b8f53a62ac272428
Signed-off-by: Robert Lyon <email address hidden>

Robert Lyon (robertl-9)
Changed in mahara:
status: In Progress → Fix Committed
Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "master" branch: https://reviews.mahara.org/5302

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/5302
Committed: https://git.nzoss.org.nz/mahara/mahara/commit/131b9ef839f2778ccdfcccc3970609d85521f073
Submitter: Aaron Wells (<email address hidden>)
Branch: master

commit 131b9ef839f2778ccdfcccc3970609d85521f073
Author: Aaron Wells <email address hidden>
Date: Thu Sep 17 11:46:40 2015 +1200

Bug 1486763: Behat test for adding/deleting comments

Change-Id: I11d959451400c8e5e5b0e67dd397fff171df0126

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "15.04_STABLE" branch: https://reviews.mahara.org/5304

Aaron Wells (u-aaronw)
Changed in mahara:
status: Fix Committed → Fix Released
Revision history for this message
Mahara Bot (dev-mahara) wrote :

Patch for "master" branch: https://reviews.mahara.org/8257

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/8257
Committed: https://git.mahara.org/mahara/mahara/commit/9f98b2d7542be8714ba60aa2f1e0e6c4402ff821
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit 9f98b2d7542be8714ba60aa2f1e0e6c4402ff821
Author: Cecilia Vela Gurovic <email address hidden>
Date: Mon Nov 6 16:04:47 2017 +1300

Bug 1729423: publish correct private comment in the list

similar to bug 1486763

behatnotneeded

Change-Id: Iaa6e337434996303208a0445099825797e65ae3e

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "17.10_STABLE" branch: https://reviews.mahara.org/8269

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Patch for "17.04_STABLE" branch: https://reviews.mahara.org/8270

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/8269
Committed: https://git.mahara.org/mahara/mahara/commit/4cafb30114036df3a6702f2285feff972b8bdea6
Submitter: Robert Lyon (<email address hidden>)
Branch: 17.10_STABLE

commit 4cafb30114036df3a6702f2285feff972b8bdea6
Author: Cecilia Vela Gurovic <email address hidden>
Date: Mon Nov 6 16:04:47 2017 +1300

Bug 1729423: publish correct private comment in the list

similar to bug 1486763

behatnotneeded

Change-Id: Iaa6e337434996303208a0445099825797e65ae3e
(cherry picked from commit 9f98b2d7542be8714ba60aa2f1e0e6c4402ff821)

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/8270
Committed: https://git.mahara.org/mahara/mahara/commit/79147d255633079970babc9293321d99cf347f42
Submitter: Robert Lyon (<email address hidden>)
Branch: 17.04_STABLE

commit 79147d255633079970babc9293321d99cf347f42
Author: Cecilia Vela Gurovic <email address hidden>
Date: Mon Nov 6 16:04:47 2017 +1300

Bug 1729423: publish correct private comment in the list

similar to bug 1486763

behatnotneeded

Change-Id: Iaa6e337434996303208a0445099825797e65ae3e
(cherry picked from commit 9f98b2d7542be8714ba60aa2f1e0e6c4402ff821)

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.