WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#25456 closed defect (bug) (duplicate)

Reading settings - bug when using static page for front page

Reported by: mikemayhem3030 Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.6.1
Component: Administration Keywords:
Focuses: Cc:

Description

Hi

I've found a bug which can mess with a website setup and it looks to be in the core / database.

The bug is when you go to the reading settings and choose a static page as the front page

wp-admin/options-reading.php

Then, say in a moment of madness I decide to trash the page I've currently got set as the static front page..

What happens next is when I go back to the reading settings page (to make it show my latest posts instead) the options have vanished to be able to do this..

solution, if I restore the page from the trash the options come back... however if I permanently delete the trash I've not found an easy way back yet.

It doesn't make the site unusable (it falls back to displaying the latest posts) but it does mean I cannot re-set a different static page as the home page.

Change History (7)

#1 @jdgrimes
6 years ago

I can confirm that this is happening to me as well on 3.6.1.

#2 follow-up: @GaryJ
6 years ago

Looking around line 90 of wp-admin/options-reading.php, the conditional seems to be that if ! get_pages() then don't show the option. So when you trashed your page, did you have any other pages still present and not trashed? (i.e., you would need to have at least one page present, for the option to do anything anyway.)

#3 in reply to: ↑ 2 @jdgrimes
6 years ago

Replying to GaryJ:

Looking around line 90 of wp-admin/options-reading.php, the conditional seems to be that if ! get_pages() then don't show the option. So when you trashed your page, did you have any other pages still present and not trashed? (i.e., you would need to have at least one page present, for the option to do anything anyway.)

I thought that I had other pages, but it turns out that the other one was a draft. So I think this is probably what's causing it for Mike as well.

#4 follow-up: @mikemayhem3030
6 years ago

Yeah it was the only page, I'd still say this is a bug though (for those just starting out)

#5 in reply to: ↑ 4 @jdgrimes
6 years ago

Replying to mikemayhem3030:

Yeah it was the only page, I'd still say this is a bug though (for those just starting out)

Yes, I think it might be better if this wasn't hidden, just disabled with a message as to why.

#6 @GaryJ
6 years ago

  • Keywords close added

I disagree - if someone is starting out, then they won't have the familiarity that an option should be there in the first place, so hinting that there's an option here that they can't access seems redundant. Keep the UI clean where possible.

If they later add at least one page, then the option becomes available, since at that point, they can utilise it. The contextual help outlines this to a user, so it's not completely hidden:

You can choose what’s displayed on the front page of your site. It can be posts in reverse chronological order (classic blog), or a fixed/static page. To set a static home page, you first need to create two Pages. One will become the front page, and the other will be where your posts are displayed.

#7 @SergeyBiryukov
6 years ago

  • Component changed from General to Administration
  • Keywords close removed
  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #15208, should be resolved in #16379.

Note: See TracTickets for help on using tickets.