Make WordPress Core

Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#8178 closed defect (bug) (duplicate)

query_posts + showposts + permalinks = 404

Reported by: wp_guy's profile wp_guy Owned by:
Milestone: Priority: normal
Severity: major Version: 2.7
Component: General Keywords: query_posts, showposts, posts_per_page, permalink, 404
Focuses: Cc:

Description

So, apparently when doing something like query_posts($query_string.'showposts=2'); in a category.php file for example. Everything seems to work fine, but the paging doesn't, I get 404 errors on the 3rd page.

Here is how the blog is setup:

  • 'Blog pages show at most' is set to 5 in the settings
  • category.php has a query_posts($query_string.'showposts=2');
  • the category I'm browsing contains 7 posts.
  • permalinks are set to 'month and name'

Here is what I do:

  1. myblog.com/category/mycategory works fine, shows 2 posts
  2. myblog.com/category/mycategory/page/2 works fine too, shows the next 2 posts
  3. myblog.com/category/mycategory/page/3 returns a 404 error.

The above works just fine if I use the default permalink structure (query string).

I've seen this error in 2.6.3 and 2.7, haven't tried on earlier versions

Change History (3)

#1 @wp_guy
16 years ago

  • Cc wes@… removed

#2 @wp_guy
16 years ago

  • Resolution set to duplicate
  • Status changed from new to closed

#3 @jacobsantos
16 years ago

  • Milestone 2.8 deleted
Note: See TracTickets for help on using tickets.