Deleting a comment in a group view always deletes the first one

Reported by François Marier on 2011-06-29
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
High
Darryl Hamilton

Bug Description

In the comment list ( comments on a view ) the earliest comment by the logged in user is always deleted instead of the chosen one, unless of course the one chosen is the earliest comment.

Darryl Hamilton (lordp) on 2011-06-29
Changed in mahara:
assignee: nobody → Darryl Hamilton (lordp)
François Marier (fmarier) wrote :
Changed in mahara:
status: Triaged → In Progress
Darryl Hamilton (lordp) wrote :

Steps to reproduce -

1) Choose a page to place feedback on
2) Place 3 or 4 dummy comments with identifiable content so you can be sure the right one is deleted
3) Click on the delete icon on the far right for any but the first one

What should happen -
1) The comment you chose should be 'deleted' (ie content replaced with a deleted message)

What does happen -
1) The first comment in the list is deleted instead

François Marier (fmarier) wrote :

Darryl, for the record (and to help me reproduce it), can you specify:

- your DB type
- your version for PHP
- browser versions

- the type of group you are creating
- did you create a new view or did you use a built-in one (like group homepage)
- the system role (user, institution admin, site admin) of the commenter
- the system role (user, institution admin, site admin) of the deleter
- the group role (group admin, member) of the commenter
- the group role (group admin, member) of the deleter

description: updated
François Marier (fmarier) wrote :

This is what Mahara receives when a delete button is clicked on Firefox 3.6 (where it works fine):

[DBG] 4e (view/view.php:78) Array
(
    [delete_comment_submit_x] => 10
    [delete_comment_submit_y] => 8
    [delete_comment_submit] => Delete
    [comment] => 2426
    [sesskey] => aMoL6nFrVmGBphZP
    [pieform_delete_comment] =>
)

and this is what it looks like on Firefox 5 (where it doesn't work):

[DBG] dc (view/view.php:78) Array
(
    [delete_comment_submit_x] => 9
    [delete_comment_submit_y] => 8
    [comment] => 2428
    [sesskey] => U0ymqt3ZsMaYKgf5
    [pieform_delete_comment] =>
)

Darryl Hamilton (lordp) wrote :

This change happened with Firefox 4, and is apparently in line with what the HTML5 spec says. It's also how Opera and IE behave.

Reviewed: https://reviews.mahara.org/406
Committed: http://gitorious.org/mahara/mahara/commit/e962f3d4fd2aa2cd43be5b55083dc065516a5528
Submitter: Francois Marier (<email address hidden>)
Branch: master

commit e962f3d4fd2aa2cd43be5b55083dc065516a5528
Author: Darryl Hamilton <email address hidden>
Date: Wed Jun 29 14:22:07 2011 +1200

    Fix comment deletion bug (bug #803247)

    Commit d807b4acf3841ba670d7a66d7a2db628cd3bba00 introduced a bug when
    deleting comments where the first one was deleted, whether the user
    chose the first one or not.

    The root cause was the change to an image submit, which changes what
    variables are included in the POST.

    Change-Id: I8897e246d6e46017ed84e30b66ff41bed5b7ecf2
    Signed-off-by: Darryl Hamilton <email address hidden>

Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/415
Committed: http://gitorious.org/mahara/mahara/commit/a546d0e71ff69ad7ab54b45beded4007785d0f66
Submitter: Francois Marier (<email address hidden>)
Branch: 1.4_STABLE

commit a546d0e71ff69ad7ab54b45beded4007785d0f66
Author: Darryl Hamilton <email address hidden>
Date: Wed Jun 29 14:22:07 2011 +1200

    Fix comment deletion bug (bug #803247)

    Commit d807b4acf3841ba670d7a66d7a2db628cd3bba00 introduced a bug when
    deleting comments where the first one was deleted, whether the user
    chose the first one or not.

    The root cause was the change to an image submit, which changes what
    variables are included in the POST.

    Change-Id: I8897e246d6e46017ed84e30b66ff41bed5b7ecf2
    Signed-off-by: Darryl Hamilton <email address hidden>

Changed in mahara:
status: In Progress → Fix Committed
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers