Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#6439 closed defect (bug) (fixed)

Manage posts filter ignores drafts

Reported by: bryan868 Owned by: ryan
Milestone: 2.5.1 Priority: high
Severity: critical Version: 2.5
Component: Administration Keywords:
Focuses: Cc:


The filter on the Manage Posts page completely ignores drafts.

If you have a draft assigned to a category with no published posts, that category will not show up in the filter. Meaning you can't filter drafts by category (or date, for that matter).

Additionally, the # count in parenthesis does not reflect drafts.

Change History (6)

#1 @bryan868
10 years ago

FYI: The filter worked properly in 2.3.3.

#2 @matt
10 years ago

  • Milestone changed from 2.5 to 2.5.1
  • Owner changed from anonymous to ryan
  • Severity changed from normal to critical

This is because the category stuff now goes through get_categories -> get_terms -> rabbit hole and that has no support for post_status in those lower level functions. I think it worked before because we did a direct SQL query, like we currently do for the dates. I can fix the dates easily, but the category stuff would touch a lot of files and I'm not comfortable with doing it right before a release, so putting this on 2.5.1 as a high priority.

#3 @ryan
10 years ago

I can filter drafts by date just fine. I set the date on a draft to a month where it is the only post. The date shows up in the dropdown and the filter works.

The category dropdown does not include categories that don't have any published posts, but this is the same behavior as 2.3. The easy fix for this is to not hide categories that don't have any published posts. Fixing counts is harder since we only cache published post counts. Regardless, I'm not seeing how this worked in 2.3. Perhaps I'm looking at the wrong thing. How about some steps to reproduce to make sure we're looking at the same thing?

#4 @ryan
10 years ago

(In [7624]) Show all categories in category filter. Don't show misleading counts. see #6439

#5 @ryan
10 years ago

(In [7625]) Show all categories in category filter. Don't show misleading counts. see #6439

#6 @ryan
10 years ago

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.