#21015 closed defect (bug) (fixed)
Months dropdown should not show if only posts are 'auto-draft' status
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 4.4 | Priority: | normal |
Severity: | normal | Version: | 3.1 |
Component: | Posts, Post Types | Keywords: | has-patch needs-screenshots |
Focuses: | administration | Cc: |
Description
The months dropdown at the top of edit.php should only show if there are actually posts in the list.
Right now, if you click 'Add new' an auto draft post will be saved. Leave the post edit screen without saving the post (so no draft will be created) and go back to the edit.php screen. There is no post in the list, but the month drop down will be shown because the auto draft is counted.
Attachments (6)
Change History (22)
#1
@
13 years ago
- Cc MikeHansenMe added
While testing this patch I realized that it was also showing dates of posts that had been deleted or 'trash' status. I updated the file to prevent both.
#2
@
13 years ago
- Keywords needs-testing added
Just realized my patch was removing dates from the trash link above the posts. I updated to allow dates for trash posts for trash status only.
#3
@
13 years ago
After testing your patch, I found out that it needs to check for the $_GET variable to be set to prevent notices. Patched that, done some testing with it. Looks good to me now.
#6
@
12 years ago
Tested this again against current trunk and made a small adjustment (no use checking for $_GET['post_status']
twice, it's there or it's not). This needs a second set of eyes to test.
#9
@
11 years ago
I emulated the issue with both Posts and Pages. Without the 21015.5 patch applied I saw that the additional month was in the dropdown even though no associated post/page showed in the All Posts/Pages list.
I applied the 21015.5 patch and repeated the exercise and found that only the month(s) with relevant / actively created content showed in the dropdown.
I also added a register_post_type
call for "Listings" in my _s theme to generate a custom post type. I observed the same behavior as above in the all "Listings" view edit.php?post_type=listing
before and after the patch was applied.
#11
@
10 years ago
- Milestone changed from Awaiting Review to 4.4
Latest patch still applies and works. Can we get this into 4.4?
#12
follow-up:
↓ 13
@
10 years ago
Wouldn't it also make sense to hide the other two dropdowns as well? You can't do any bulk actions to non existant posts and you can't filter by categories if there are no posts.
Filters out the posts with 'auto-draft' as status in counting query