Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#24818 closed defect (bug) (fixed)

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

Reported by: creativeinfusion's profile creativeinfusion Owned by: nacin's profile 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 11 years ago.
Add show_in_admin_all_list states into user counts query
24818.2.diff (854 bytes) - added by creativeinfusion 11 years ago.

Download all attachments as: .zip

Change History (14)

@creativeinfusion
11 years ago

Add show_in_admin_all_list states into user counts query

#2 follow-up: @anonymized_10276468
11 years 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 11 years ago by anonymized_10276468 (previous) (diff)

#3 in reply to: ↑ 2 ; follow-up: @helen
11 years ago

Replying to anand.potukuchi:

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

#4 follow-up: @SergeyBiryukov
11 years 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.

#5 follow-up: @SergeyBiryukov
11 years 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/.

#6 in reply to: ↑ 4 @creativeinfusion
11 years 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.

#7 @SergeyBiryukov
11 years ago

  • Keywords 3.7-early added

This would be consistent with [13198].

#8 in reply to: ↑ 5 @anonymized_10276468
11 years 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 11 years ago by anonymized_10276468 (previous) (diff)

#9 in reply to: ↑ 3 @anonymized_10276468
11 years 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

#10 @wonderboymusic
11 years ago

  • Milestone changed from Awaiting Review to 3.7

these are all marked 3.7-early

#11 @nacin
11 years 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.

#12 @nacin
11 years 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.