﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc
10822	Post page is 404 when no post found on static page for homepage	v.guerard	ryan	"On front page configuration, I specify 2 static pages, one for homepage (ex: page1), and another for posts page (ex: page2).

If I have no post, page2 is like a 404 page.

The $wp_query is well parsed, but on handle_404() call, no test on $wp_query->is_posts_page flag is available (like category or tag query).
The handle_404 test change the $wp_query setting and it's not possible to know if we are in posts_page or not(is_404 = true and is_posts_page = false).

is_post_page is not used a lot in the source code, I haven't found an is_posts_page() global function.
So we can had it :

'''function is_posts_page() {'''
	'''global $wp_query;'''

	'''return ($wp_query->is_posts_page);'''
'''}'''

and in handle_404 of wp-includes/classes.php (line 464 on 2.8) change the line 
if ( ( is_tag() || is_category() || is_author() ) && $wp_query->get_queried_object() ) {
by
if ( ( is_tag() || is_category() || is_author() || '''is_posts_page()''') && $wp_query->get_queried_object() ) {

It's seem that the problem is only available with this configuration. No problem if I use same homepage and post_page.
"	defect (bug)	closed	normal		Query	2.8	normal	invalid	is_posts_page	
