#24171 closed defect (bug) (fixed)
Trashing a page selected as "Page on Front" produces homepage 404
| Reported by: | danielbachhuber | Owned by: | nacin |
|---|---|---|---|
| Priority: | low | Milestone: | 3.7 |
| Component: | General | Version: | |
| Severity: | minor | Keywords: | has-patch |
| Cc: | Focuses: |
Description (last modified by )
Steps to produce:
- Create a new page called "My Home Page". Add some bacon ipsum.
- Assign the page as your static home page.
- 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.
Attachments (2)
Change History (12)
#8
@
13 years ago
I was going to commit this, then I thought about my comment — what about 24171.diff?
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
24171.1.diff is a POC of what I think should be happening (and throwing the
unstick_post()in there for good riddance).