Opened 9 years ago
Last modified 6 years 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: |
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.
Patch for bug described in ticket.