[wp-trac] [WordPress Trac] #24171: Trashing a page selected as "Page on Front" produces homepage 404

WordPress Trac noreply at wordpress.org
Tue Apr 23 21:59:18 UTC 2013


#24171: Trashing a page selected as "Page on Front" produces homepage 404
-----------------------------+------------------------------
 Reporter:  danielbachhuber  |       Owner:
     Type:  defect (bug)     |      Status:  new
 Priority:  low              |   Milestone:  Awaiting Review
Component:  General          |     Version:
 Severity:  minor            |  Resolution:
 Keywords:                   |
-----------------------------+------------------------------
Description changed by danielbachhuber:

Old description:

> 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.
>
> Related: #16379, #14403

New description:

 Steps to produce:

 1. Create a new page called "My Home Page". Add some bacon ipsum.
 1. Assign the page as your static home page.
 1. 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

--

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/24171#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list