Ticket #5361 (closed defect: fixed)

Opened 1 year ago

Last modified 1 year ago

Deleting a set front page should then display posts on front page

Reported by: hailin Assigned to: anonymous
Priority: normal Milestone: 2.5
Component: General Version: 2.5
Severity: normal Keywords: has-patch
Cc:

Description

Create a new page.

Go to Options > reading and set that page as the front page.

Now delete that new page

Front of the blog goes blank.

Expected behaviour: It defaults back to Posts.

============================================ Hailin: The root cause is the following: Suppose option show_on_front is configured to "page", and page_on_front is set to a specific page_id, and/or page_for_posts is set to another page_id.

Then the user deletes a page from Manage=>Page, which happens to be the configured page_on_front. Then the page is gone, but those options still hold that deleted page_id. That cause the reported problem.

The fix is that when we delete a page, we check to see whether the page is used in any of those options. If yes, we adjust them as well.

Attachments

569_show_on_front.diff (0.8 kB) - added by hailin on 11/16/07 01:33:53.
patch file

Change History

11/16/07 01:33:53 changed by hailin

  • attachment 569_show_on_front.diff added.

patch file

11/16/07 02:21:03 changed by lloydbudd

  • keywords set to has-patch.
  • version set to 2.4.
  • milestone changed from 2.5 to 2.4.

11/16/07 17:39:15 changed by ryan

  • status changed from new to closed.
  • resolution set to fixed.

(In [6337]) Update page on front settings when deleting the page on front. Props hailin. fixes #5361