Make WordPress Core

Opened 3 years ago

Closed 10 months ago

Last modified 10 months ago

#41492 closed defect (bug) (wontfix)

Trash page should not show to Admin if there is a no Post in Trash.

Reported by: Jaydeep Rami Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Posts, Post Types Keywords:
Focuses: ui, administration Cc:


Under admin do the following
1) Go to Post Listing on Admin ( I have only 1 default Post 'Hello World!')


2) Just Trash the Post.


3) Go to Trash and just restore deleted Post. In Trash menu, it's selected which is good.

4) After Step 3, Just click on the 'Restore' button to restore post. It restores successfully but it's not redirected to the 'ALL' post.

It still displays 'Trash' page However there is a no trashed post in it. So it does not make sense to display 'Trash' page if in Admin side not display 'Trash(0)' from the Menu.

Expected behavior:
1) When we restore then it's should redirect to the Post listing page and selected with 'ALL'.


Change History (5)

#1 @swissspidy
3 years ago

  • Component changed from General to Posts, Post Types
  • Keywords needs-patch added
  • Version 4.8 deleted

Somehow related: #40188, #37407, #38341

#2 @shaneeckert
17 months ago

The behavior could be changed so that when you restore a post from the trash that you are redirected back to all the posts. But this may not be what you want if there are still items in the trash. There would need to be a check to see if there are any posts in the trash before redirecting you to the all posts page, if there are, then stay on the trash page.

Or do you think that it's a better flow to restore an item from the trash and then be taken to the all posts page even if there are still posts in the trash?

Last edited 17 months ago by shaneeckert (previous) (diff)

#3 @Presskopp
17 months ago

I don't see a reason why this needs to be changed. After having no more items in the trash you have a optical feedback that the trash is empty looking at it. From there you can decide if you go to 'All' or 'Published' or wherever. The admin should always be in control and not get redirected 'somewhere'. So for me this is a candidate for a 'wontfix'.

#4 @Mista-Flo
10 months ago

  • Resolution set to wontfix
  • Status changed from new to closed

+1 @Presskopp It's an expected behavior and we should not force user to be redirected.

#5 @desrosj
10 months ago

  • Keywords needs-patch removed
  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.