Make WordPress Core

Opened 8 years ago

Closed 8 years ago

#34004 closed defect (bug) (fixed)

Changing Static Front Page setting in Customizer doesn't update Page listing hints

Reported by: ahortin's profile ahortin Owned by: westonruter's profile westonruter
Milestone: 4.4 Priority: normal
Severity: normal Version: 3.4
Component: Customize Keywords: has-patch
Focuses: Cc:


When you change the 'Front page displays' setting on the Settings > Reading page, to create a static front page, you will see a ‘hint’ next to the relevant page when you view your list of pages (Pages > All Pages). i.e. If I’ve set the Front-Page and Posts page, it will actually show this with either ‘- Posts Page’ or ‘- Front Page’ next to the title for the relevant Pages.

Additionally, as you’d expect, if you change this setting back using the Settings > Reading page, the hints will disappear.

However, if in the Customizer, you alter these settings from a static front page, back to displaying posts on the front page, these hints are not removed.

I've tested this without any plugins enabled and also using multiple themes, including default themes such as Twenty Twelve and Twenty Fifteen.

Steps to reproduce:

  • Visit Settings > Reading page
  • Select 'A static page (select below)' radio button
  • Select a page from 'Front page:' dropdown
  • Select a page from 'Posts page:' dropdown
  • Click Save Changes button to save your changes
  • Visit Pages > All Pages and verify hints are displaying next to the relevant pages you selected above
  • Visit Appearance > Customize > Static Front Page
  • Select 'Your latest posts' radio button
  • Click Save & Publish button to save your changes
  • Visit Pages > All Pages and verify hints are still displaying

Attachments (1)

34004.diff (886 bytes) - added by westonruter 8 years ago.

Download all attachments as: .zip

Change History (4)

8 years ago

#1 @westonruter
8 years ago

  • Keywords has-patch added
  • Milestone changed from Awaiting Review to 4.4
  • Version changed from 4.3.1 to 3.4

When on the reading page, if you change the show_on_front setting, it will also clear out the page_on_front and page_for_posts settings. In the Customizer, however, just changing the show_on_front will only effect that one option.

So either changing the show_on_front setting in the Customizer should empty out the page_on_front and page_for_posts settings (which I think would be annoying if the user wants to toggle back), or we can just prevent those hints (post states) from being shown when show_on_front is not “page” (which I prefer).

See 34004.diff

#2 @netweb
8 years ago

Confirming patch 34004.diff fixes this.

#3 @westonruter
8 years ago

  • Owner set to westonruter
  • Resolution set to fixed
  • Status changed from new to closed

In 34605:

Customize: Prevent showing "Front Page" and "Posts Page" states for pages in list table when show_on_front is not "page".

Changing the show_on_front option back to "posts" also resets the page_on_front and page_for_posts options when updating via the Reading settings page. In the Customizer, however, this is not the case as these other options remain unchanged. This change accounts for this difference in behavior.

Fixes #34004.

Note: See TracTickets for help on using tickets.