Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When a static front page is configured, the Appearance Menus Screen and search functionality are negatively impacted. #330

Open
richaber opened this issue Sep 15, 2015 · 0 comments

Comments

@richaber
Copy link

With a default twenty* theme active, the Babble plugin enabled, languages configured, and translated content available, go to the Appearance Menus Screen and note that all content is available in the menu item meta boxes as expected.

Go to the front end of the site and perform a search. Note that the search functionality works as expected.

Now go to the Settings Reading Screen in Admin, and set a static front page.

After setting the static front page, return to the Appearance Menus Screen and note that not all content is available in the menu item meta boxes.

In fact, it appears that only the static front page is available to choose from in any post type menu item metabox. This implies that the front page is "taking over" the menu items available in the metaboxes on the Appearance Menus Screen.

Additionally, perform a new search from the front end of the site, and note that search no longer returns results, no matter the language, no matter the content searched for. This implies that the search query_var is dropped at some point, but only when a static front page has been configured.

Note the check for the page_on_front option at line 1069 of the Babble_Post_Public::translate_query_vars method on the develop branch.

if ( 'page' == get_option('show_on_front') && $page_on_front = get_option('page_on_front') ) {

It appears that this check is interfering with both the menu items metaboxes on the Appearance Menus Screen, and the search functionality, when a static front page has been set.

Changing that check to

if ( ! isset( $query_vars['s'] ) && 'page' == get_option( 'show_on_front' ) && $page_on_front = get_option( 'page_on_front' ) ) {

appears to resolve both the Appearance Menus Screen issues and search functionality issues.

In my testing, this did not appear to have a negative impact on any other expected functionality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant