WordPress.org

Make WordPress Core

Opened 12 months ago

Last modified 7 months ago

#24171 closed defect (bug)

Trashing a page selected as "Page on Front" produces homepage 404 — at Version 1

Reported by: danielbachhuber Owned by:
Milestone: 3.7 Priority: low
Severity: minor Version:
Component: General Keywords: has-patch
Focuses: Cc:

Description (last modified by danielbachhuber)

Steps to produce:

  1. Create a new page called "My Home Page". Add some bacon ipsum.
  2. Assign the page as your static home page.
  3. Trash the page, but don't delete it.

Expected behavior: My homepage reverts to a list of my most recent posts

Actual behavior: 404 template is loaded.

In r6337, we started listing most recent posts when the page is deleted. However, there's a short circuit (added later) in wp_delete_post() to wp_trash_post(), which doesn't delete the option. This results in the homepage not being reset until the post is actually deleted.

I think the trashing behavior should be consistent with deleting behavior.

Related: #16379, #14403

Change History (2)

comment:1 danielbachhuber12 months ago

  • Description modified (diff)

danielbachhuber12 months ago

Note: See TracTickets for help on using tickets.