WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#6458 closed defect (bug) (fixed)

Deleting comment results in error

Reported by: dougal Owned by: ryan
Milestone: 2.5.1 Priority: normal
Severity: normal Version: 2.5
Component: General Keywords: comments, delete, has-patch, 2nd-opinion
Focuses: Cc:

Description

This occurs when using the 'Edit comment' link from a post comment.

Steps to recreate:

  1. View a post with comments
  2. Click "edit" link on the comment
  3. Click "Delete Comment" from the comment edit admin page
  4. Confirm comment deletion in AYS
  5. Edit Comment page refreshes with "Oops, no comment with this ID. Go back!"

Expected result: Return to post view.

The comment *is* properly deleted. The only problem is that it tries to refresh the edit page with the now-invalid comment-id.

Attachments (1)

CommentDeleteFix.diff (591 bytes) - added by snumb130 6 years ago.
Patch to fix comment delete error

Download all attachments as: .zip

Change History (9)

comment:1 westi6 years ago

You get this with any delete of a comment from the edit view not just via the route described above.

snumb1306 years ago

Patch to fix comment delete error

comment:2 snumb1306 years ago

  • Keywords has-patch 2nd-opinion added

I attached a patch for this. I am not sure if this is the best approach or not, but it was what I came up with. I am sure there is another way.

comment:3 snumb1306 years ago

  • Owner changed from anonymous to snumb130
  • Status changed from new to assigned

comment:4 snumb1306 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

comment:5 snumb1306 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

comment:6 ryan6 years ago

  • Owner changed from snumb130 to ryan
  • Status changed from reopened to new

comment:7 ryan6 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [7755]) Redirect back to original referer when deleting a comment from the edit comment page. fixes #6458 for trunk

comment:8 ryan6 years ago

(In [7756]) Redirect back to original referer when deleting a comment from the edit comment page. fixes #6458 for 2.5

Note: See TracTickets for help on using tickets.