Make WordPress Core

Opened 11 years ago

Closed 9 years ago

#14403 closed defect (bug) (fixed)

Trashing all pages can lead to users being trapped with a front page 404

Reported by: markel Owned by: westi
Milestone: 3.1 Priority: normal
Severity: normal Version: 3.0
Component: UI Keywords: has-patch
Focuses: Cc:


If a user sets a page as the front page of their site in Settings > Reading, and then deletes all of the pages from their site, the option to change the front page back to the default is hidden (since no pages exist) and it's not obvious what to change in order to get the selector back.

The selector should either not be hidden when it is configured to use a static page, or the option should be returned to default upon trashing the page that was selected.

Steps to reproduce:

  1. Create a page.
  2. Set the page to be the front page of the site in Settings > Reading.
  3. Trash the page.
  4. Navigate back to Settings > Reading. You cannot restore the front page to the recent posts option and visitors to the site are greeted by the 404 page.

Attachments (1)

14403.diff (637 bytes) - added by nacin 11 years ago.
Simple patch.

Download all attachments as: .zip

Change History (9)

#1 @nacin
11 years ago

  • Milestone changed from Awaiting Review to 3.1
  • Severity changed from normal to minor

If you simply press "Save" on Settings > Reading, it should restore the setting. A pleasant side effect of [14362].

Realistically, like what it does in [15227], if we end up with no pages but we're not currently show_on_front, we should just update the option right away, in addition to spitting out an input=hidden field to update it on save.

11 years ago

Simple patch.

#2 @nacin
11 years ago

  • Keywords has-patch added

#3 @westi
11 years ago

  • Owner set to westi
  • Severity changed from minor to normal
  • Status changed from new to accepted

This is less than awesome :-(

#4 @mrmist
11 years ago

Related #15208

#5 @automattor
11 years ago

(In [16816]) Update show_on_front to posts if there are no pages, just in case. see #14403.

#6 @nacin
11 years ago

  • Milestone changed from 3.1 to Future Release

Moving to future. #15208 might be a better long-term solution.

#7 @MikeHansenMe
9 years ago

  • Keywords close added

This seems to be fixed in 3.5-beta-1 . I created a page "Home" and went to settings->reading and selected "Home" as the front page. Then deleted the page and went back to settings->reading and it showed "-Select-" for the front page with no errors. When visiting the site it does show the not found page. This is the behavior I expected. Proposing we close this ticket.

#8 @SergeyBiryukov
9 years ago

  • Keywords close removed
  • Milestone changed from Future Release to 3.1
  • Resolution set to fixed
  • Status changed from accepted to closed
Note: See TracTickets for help on using tickets.