Opened 11 months ago

Last modified 8 months ago

#21015 new defect (bug)

Months dropdown should not show if only posts are 'auto-draft' status

Reported by: CoenJacobs Owned by:
Priority: normal Milestone: Awaiting Review
Component: Administration Version: 3.1
Severity: normal Keywords: has-patch needs-testing
Cc: MikeHansenMe

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 (4)

21015.diff (471 bytes) - added by CoenJacobs 11 months ago.
Filters out the posts with 'auto-draft' as status in counting query
21015.2.diff (503 bytes) - added by MikeHansenMe 9 months ago.
filters trash status as well.
21015.3.patch (745 bytes) - added by MikeHansenMe 9 months ago.
21015.4.patch (846 bytes) - added by CoenJacobs 9 months ago.

Download all attachments as: .zip

Change History (9)

Filters out the posts with 'auto-draft' as status in counting query

filters trash status as well.

  • 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.

  • 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.

After testing you 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.

Version 0, edited 9 months ago by CoenJacobs (next)

Looks good

#22033 was marked as a duplicate.

Note: See TracTickets for help on using tickets.