[wp-trac] [WordPress Trac] #19463: Archive page should not return 404 when requested page is larger than max page
WordPress Trac
wp-trac at lists.automattic.com
Wed Dec 7 04:39:24 UTC 2011
#19463: Archive page should not return 404 when requested page is larger than max
page
---------------------------+-----------------------------
Reporter: kayue | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Rewrite Rules | Version:
Severity: major | Keywords: needs-patch
---------------------------+-----------------------------
Right now Wordpress return 404 when requested page number is larger than
max page, and this could be a problem when people changed posts_per_page
on query_posts.
For example, assuming the default post per page is 10 (in Reading
Settings), and there are 15 posts in archive page (total 2 pages).
In archive.php, if I change the post_per_page to 5, there will be totally
3 pages. With the current implementation, the third page will return 404
page not found, because with the default setting, this page shouldn't
exist.
I suggest Wordpress should still load archive.php even requested page is
larger than max page, and use have_posts() to determine what to display
(similar to loop-home.php)
Related discussions in forum:
* http://wordpress.org/support/topic/error-404-on-pagination-when-
changing-posts_per_page-on-query_posts
* http://wordpress.org/support/topic/pagination-with-custom-post-type-
listing?replies=23
--
Ticket URL: <http://core.trac.wordpress.org/ticket/19463>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list