Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#33829 closed defect (bug) (fixed)

Comment Offset in Post Edit Screen

Reported by: ronalfy's profile ronalfy Owned by: wonderboymusic's profile wonderboymusic
Milestone: 4.4 Priority: normal
Severity: normal Version: 4.3
Component: Comments Keywords: has-patch
Focuses: javascript, administration Cc:

Description

If you have several comments (say, roughly 24), and you are on the posts edit screen, you may trash and spam comments.

If you trash/spam several comments, and click on the Show More Comments link, the offset is off.

This either results in earlier comments being shown, skipping comments that should be shown, or assuming there are no comments left to show at all.

http://www.ronalfy.com/wp-content/blogs.dir/3/files/2015/09/comment-offset.jpg

I will post a video of the bug when I have more time to tackle this.

Attachments (1)

33829.diff (1.0 KB) - added by utkarshpatel 9 years ago.
Added load function to pass current visible TR in js and load more comment will now call load function instead of get function directly.

Download all attachments as: .zip

Change History (5)

@utkarshpatel
9 years ago

Added load function to pass current visible TR in js and load more comment will now call load function instead of get function directly.

#1 @utkarshpatel
9 years ago

  • Keywords has-patch added

This ticket was mentioned in Slack in #core by patelutkarsh. View the logs.


9 years ago

#3 @SergeyBiryukov
9 years ago

  • Milestone changed from Awaiting Review to 4.4

#4 @wonderboymusic
9 years ago

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

In 34069:

When clicking "Show More Comments" in the Comments meta box on the Edit Post screen, change the click behavior to call a new class method on commentsBox, ->load(), that resets st (cool name) to the number of visible <tr>s before calling ->get(). This will account for spam'd and trash'd comments when returning comments at the proper offset.

Props utkarshpatel.
Fixes #33829.

Note: See TracTickets for help on using tickets.