Make WordPress Core

Opened 4 years ago

Last modified 2 months ago

#21492 new defect (bug)

Theme customizer > Static front page: missing error message when front page and posts pages are similar

Reported by: hd-J Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version:
Component: Customize Keywords: needs-patch
Focuses: ui Cc:


Steps to reproduce:

  1. Activate Twenty Eleven
  2. Open the Customizer
  3. In "Static Front page", choose the same page as your front page and Posts page:

Would it be possible to display the same warning in the Customizer, to avoid any confusion for the users?

Related: #19627 and #16379

Attachments (1)

21492.patch (1.6 KB) - added by ocean90 3 years ago.

Download all attachments as: .zip

Change History (14)

#1 @SergeyBiryukov
4 years ago

  • Component changed from Themes to Appearance

#2 @jkudish
4 years ago

related: #19627

Version 0, edited 4 years ago by jkudish (next)

#3 @jkudish
4 years ago

  • Cc joachim.kudish@… added

This ticket was mentioned in IRC in #wordpress-dev by ericandrewlewis. View the logs.

3 years ago

3 years ago

#5 follow-up: @ocean90
3 years ago

  • Focuses ui added
  • Keywords has-patch added
  • Milestone changed from Awaiting Review to Future Release

Interesting that we have this warning, which seems a bit useless.

21492.patch is a first try to bring the warning to the Customizer. Currently it only compares the values when a setting is changed and shows the same message if the values are equal. Another idea would be to just remove the value from the other menu.

Also I'm not sure if should just wait for #19627 and #16379.

#7 @chriscct7
16 months ago

  • Keywords dev-feedback added

#8 in reply to: ↑ 5 @westonruter
16 months ago

Replying to ocean90:

Another idea would be to just remove the value from the other menu.

If we did that, then we should also display a notice ensuring that the user sees that the other setting has been reset, and explain that the two page designations can't point to the same page.

#9 @lancewillett
9 months ago

This came up recently in Calypso GitHub: https://github.com/Automattic/wp-calypso/issues/3085 — similar discussion. I think it'd be a nice enhancement, especially for new users — to avoid the confusion of setting the same page for both Posts and Static Home Page.

#10 @sixhours
6 months ago

Would love to see this happen. It's a common source of user confusion. I started a patch, but it's written in jQuery; a vanilla JS solution like the above would probably be better.

This ticket was mentioned in Slack in #core-customize by celloexpressions. View the logs.

4 months ago

#12 @westonruter
4 months ago

  • Keywords needs-patch added; has-patch dev-feedback removed

This should be re-worked to use the new setting validation API. If page_on_front is set to the same as page_for_posts it can fail validation.

Furthermore, this can be improved further to prevent the two dropdowns from selecting the same page to begin with. Once a selection is made in the first dropdown, the corresponding option in the second dropdown can be disabled to prevent it from even being selected. I recently implemented this on a Select2 replacement for the existing dropdown-pages controls: https://github.com/xwp/wp-customize-object-selector/pull/22

#13 @sixhours
2 months ago

This is the solution we're using on WordPress.com, in hopes it's helpful: https://github.com/sixhours/wp-customizer-fix

Note: See TracTickets for help on using tickets.