[wp-testers] previous_posts_link() buggy ?
e-head
ebone+wp-testers at dotsandloops.net
Mon Apr 25 22:31:11 GMT 2005
On 04/25/05 17:15 or thereabouts, Ryan Boren scribbled:
> On Mon, 2005-04-25 at 17:30 -0400, e-head wrote:
> > This function sometimes creates a link when there are no more posts.
> >
> > I've had this problem for a while now.
> >
> > You can see an example of it here:
> > http://dotsandloops.net/page/19/
> >
> > click "older" twice ... it will throw up the "Sorry, no posts matched
> > your criteria." message.
> >
> > you can also see it here:
> > http://dotsandloops.net/blog/category/pictures/
> >
> > Interestingly ...
> > My pictures category was working fine till I edited some of the posts
> > and added them to another category (cute) in addition to the pictures
> > category ... then I started getting the erroneous "- older" link with
> > previous_posts_link().
>
> If you page by days (rather than posts), this will happen. We currently
> don't have code that will calculate the max number of pages when paging
> by days.
I page by posts (5 posts) ... but I "override" the posts_per_page number
via the query string sometimes ... I wonder if this would cause problems
? e.g., here (http://dotsandloops.net/blog/category/pictures/) I
override it to do 20 ppp. But, here (http://dotsandloops.net/page/19/)
it should be set to the default 5.
What's weird is the pictures category worked fine until I added some of
it's posts to another category too ...
There is a little gremlin somewhere.
Any idea how I could debug this ?
Try and figure out what posts it "thinks" should come next ?
--
"Every injustice that has ever been fastened upon women
in a Christian country has been "authorized by the Bible"
and riveted and perpetuated by the pulpit."
[Helen H. Gardner]
More information about the wp-testers
mailing list