WordPress.org

Make WordPress Core

Opened 4 years ago

Last modified 5 months ago

#33216 new defect (bug)

Users.php post count is not accurate as it does not include drafts.

Reported by: emirpprime Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Users Keywords: has-patch
Focuses: administration Cc:
PR Number:

Description

On Users.php, the post count for users does not include Draft posts. However if you click on the number to view the Users' posts, the view presented does include drafts. I consider this a UX bug.
More seriously when, for example, deleting unused users, this number indicates a user has no posts when in fact they may have Draft posts. This can lead to posts being deleted when the users is deleted in the belief they have no (post) content. This is a much more serious UX problem as it can result in loss of content.

I have attached a patch to add another variable to get_posts_by_author_sql() and count_many_users_posts() / count_user_posts() to allow the inclusion of drafts. The variable is set to false by default so it does not effect any existing use of the functions.

Attachments (1)

#33216 (4.8 KB) - added by emirpprime 4 years ago.
Patch for bug described in ticket.

Download all attachments as: .zip

Change History (5)

@emirpprime
4 years ago

Patch for bug described in ticket.

#1 @SergeyBiryukov
4 years ago

  • Component changed from Administration to Users
  • Focuses administration added

#2 @emirpprime
4 years ago

  • Keywords has-patch added

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


4 years ago

#4 @obenland
4 years ago

  • Version trunk deleted
Note: See TracTickets for help on using tickets.