WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 3 years ago

Last modified 3 years ago

#14274 closed defect (bug) (worksforme)

++ instead of -- on comment total count after edit

Reported by: nacin Owned by: scribu
Milestone: Priority: lowest
Severity: trivial Version: 3.0
Component: Comments Keywords:
Focuses: Cc:

Description

When moderating a comment that removes it from the screen, the total page count, i.e. 1-20 of 67, goes up (68) instead of down (66).

The issue is updateCount() in edit-comments.dev.js, which sets n to n + n1 before returning n. n - n1 is correct, but I think only for this instance of updateCount(), the rest need +. Still looking though.

Attachments (1)

14274.diff (792 bytes) - added by frankperez87 4 years ago.

Download all attachments as: .zip

Change History (9)

frankperez874 years ago

comment:1 frankperez874 years ago

  • Keywords has-patch dev-feedback added; needs-patch removed
  • Owner set to frankperez87
  • Status changed from new to accepted
  • Version set to 3.0

From what i saw when checking the comments, the integer after the word of does not update when deleting using the ajax calls. Adding a simple span class of total-type-count around the %s in a sprintf function on line 307 will solve the ajax updates.

comment:2 ptahdunbar4 years ago

  • Resolution set to invalid
  • Status changed from accepted to closed

comment:3 scribu4 years ago

Why was this closed as invalid?

comment:4 nacin4 years ago

  • Resolution invalid deleted
  • Status changed from closed to reopened

comment:5 scribu4 years ago

  • Keywords dev-feedback removed
  • Owner changed from frankperez87 to scribu
  • Status changed from reopened to accepted

With the new pagination style, this is not a problem anymore.

However, we should clean up updateCount().

comment:6 scribu3 years ago

  • Keywords has-patch removed
  • Milestone changed from 3.1 to Future Release

Punting for now.

Another idea would be to update the entire .subsubsub list when performing an action on the comment, so that we don't have to take care of all the extra logic.

comment:7 PeteMall3 years ago

  • Resolution set to worksforme
  • Status changed from accepted to closed

Seems to be fixed in trunk.

comment:8 nacin3 years ago

  • Milestone Future Release deleted
Note: See TracTickets for help on using tickets.