WordPress.org

Make WordPress Core

Opened 12 months ago

Closed 9 months ago

#24818 closed defect (bug) (fixed)

Post counts for 'mine' and 'all' can be inconsistent on edit posts admin screens

Reported by: creativeinfusion Owned by: nacin
Milestone: 3.7 Priority: normal
Severity: minor Version: 3.0
Component: Administration Keywords: has-patch 3.7-early
Focuses: Cc:

Description

The count for the users own posts and the count for all posts should both use the same post status criteria, but at present 'all' posts excludes the show_in_admin_all_list statuses whilst the user count only excludes trash and draft.

An easy way to test this without needing to create custom statuses is

  1. Log in to wp-admin without having edit_others_post capability (e.g. author)
  2. Upload a media item if this user doesn't have any
  3. Go to edit posts screen
  4. Modify the query to include ?post_type=attachment

Attachments (2)

24818.diff (921 bytes) - added by creativeinfusion 12 months ago.
Add show_in_admin_all_list states into user counts query
24818.2.diff (854 bytes) - added by creativeinfusion 12 months ago.

Download all attachments as: .zip

Change History (14)

creativeinfusion12 months ago

Add show_in_admin_all_list states into user counts query

comment:2 follow-up: anand.potukuchi12 months ago

  • Keywords reporter-feedback dev-feedback close added

I am so sorry but where else did i change the keywords? I am sorry if i made a mistake but i'm still learning. I apologize

Last edited 12 months ago by anand.potukuchi (previous) (diff)

comment:3 in reply to: ↑ 2 ; follow-up: helen12 months ago

Replying to anand.potukuchi:

I've seen you do this keyword changing without further explanation a few times - care to explain why?

comment:4 follow-up: SergeyBiryukov12 months ago

  • Keywords needs-refresh added; reporter-feedback dev-feedback close removed

The patch needs a refresh, it duplicates line 59. See also http://make.wordpress.org/core/handbook/coding-standards/php/#space-usage.

comment:5 follow-up: SergeyBiryukov12 months ago

Replying to anand.potukuchi:

If you're just getting familiar with the Trac workflow, take a look at http://make.wordpress.org/core/handbook/trac/keywords/. If you have any questions, just ask in #wordpress-dev or #wordpress-contribute.

Note that submitting a patch makes you a core contributor (once the patch is committed), but not a Core Developer of WordPress (which is what your WP.org profile currently says), see http://make.wordpress.org/core/handbook/project-organization/.

creativeinfusion12 months ago

comment:6 in reply to: ↑ 4 creativeinfusion12 months ago

  • Keywords needs-refresh removed

Replying to SergeyBiryukov:

The patch needs a refresh, it duplicates line 59. See also http://make.wordpress.org/core/handbook/coding-standards/php/#space-usage.

Patch corrected and thanks for the coding pointers.

comment:7 SergeyBiryukov12 months ago

  • Keywords 3.7-early added

This would be consistent with [13198].

comment:8 in reply to: ↑ 5 anand.potukuchi12 months ago

Replying to SergeyBiryukov:

Replying to anand.potukuchi:

If you're just getting familiar with the Trac workflow, take a look at http://make.wordpress.org/core/handbook/trac/keywords/. If you have any questions, just ask in #wordpress-dev or #wordpress-contribute.

Note that submitting a patch makes you a core contributor (once the patch is committed), but not a Core Developer of WordPress (which is what your WP.org profile currently says), see http://make.wordpress.org/core/handbook/project-organization/.

I got that. changed to WP contributor. how do i get to #wordpress-dev/contribuite. I am new here. Sorry if i caused any misconceptions/problems.

Last edited 12 months ago by anand.potukuchi (previous) (diff)

comment:9 in reply to: ↑ 3 anand.potukuchi12 months ago

Replying to helen:

Replying to anand.potukuchi:

I've seen you do this keyword changing without further explanation a few times - care to explain why?

I am so sorry but where else did i change the keywords? I am sorry if i made a mistake but i'm still learning. I apologize

comment:10 wonderboymusic11 months ago

  • Milestone changed from Awaiting Review to 3.7

these are all marked 3.7-early

comment:11 nacin9 months ago

Looks good. I agree with Sergey.

Observation: It seems the original report uses attachments as an example because the only internal status other than trash and auto-draft is inherit.

comment:12 nacin9 months ago

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

In 25676:

Post lists table: When counting a user's posts, use get_post_stati() instead of hardcoded internal statuses.

props creativeinfusion.
fixes #24818.

Note: See TracTickets for help on using tickets.