[wp-trac] [WordPress Trac] #28454: Incorrect behaviour when Appearance > Customize saves front page options
WordPress Trac
noreply at wordpress.org
Wed Jun 4 16:44:58 UTC 2014
#28454: Incorrect behaviour when Appearance > Customize saves front page options
--------------------------------+-----------------------------
Reporter: ElectricFeet | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Options, Meta APIs | Version: 3.9
Severity: normal | Keywords:
Focuses: ui, administration |
--------------------------------+-----------------------------
'''Correct/expected behaviour:'''
If you change your settings in ''Settings'' > ''Reading'' > ''Front page
displays'' as follows:
''From:''
A static page (select below)
-- Front page: home
-- Posts page: blog
''To:''
Your latest posts
then the `Show_on_front` setting is correctly changed to `posts` and the
`Page_on_front` setting correctly gets reset to `0`.
'''Incorrect behaviour:'''
If instead you change the same settings from ''Appearance'' >
''Customize'', the `Show_on_front` setting is correctly changed to
`posts`, but the `Page_on_front` setting is not reset and remains set to
the previous setting's page ID.
'''Testing done:'''
I replicated this behaviour with several themes, including twenty
fourteen, with all plugins deactivated.
'''Why this is a problem:'''
This is inconsistent and may cause errors--e.g. if a theme or plugin
author checks the `Page_on_front` setting without also checking the
`Show_on_front` setting. This is how I encountered it, in Polylang; plugin
author had to work around it; details here:
http://wordpress.org/support/topic/wrong-front-page-showing-in-appearance-
customize-with-polylang-loaded).
'''Solution (indicative; I'm not an expert):'''
Re-use the "Settings > Reading > Front page displays" code in the
"Appearance > Customize" functions.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/28454>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list