Topic: Another paging bug?

I was checking "Show new posts since last visit" and it said that there was 4 pages. This is what the 4:th page looked like:

http://www.punres.org/paging.png

Either it is the paging function (which I doubt) or it is something else ^^

Re: Another paging bug?

Hmm, looks like the bug described in this thread.

3

Re: Another paging bug?

hello all,

I have punBB1.2.5 english + the "mark as read" mod, my topics database has been transfered from an older phpBB forum (using the convert tool from punBB site)

it seems that my long topics (800 to 2500 posts) have a paging bug. when I try to check the last non-read post, it seems to take me to the last page (248/248) but not at the last post. (page used is viewtopic.php?pid=XXX#pXXX ).
nor I can see the last post by clicking on the last page number (sometimes I get to another last post that wasn't the one i get by using the direct anchored link)

however when i use "reply to this post" I can see the last post.

this "bug" randomly appears. sometime I get the right post (N), then a few minutes later, I can't even get the post N-4...

seems really strange to me. I look in the database and the postcount for the topic does not seem to be right.

excuse me for my poor english, hope my explanations are enough clear.

Re: Another paging bug?

try doing this edits? http://punbb.org/forums/viewtopic.php?pid=39852#p39852

5 (edited by tam 2005-06-08 19:39)

Re: Another paging bug?

thanks a lot connor, i'll do this, then i'll test in deep and i'll warn you.
and thanks for the fast answer smile

EDIT : this patch has correct the bug, thanks again for support

Re: Another paging bug?

Jansson, CodeDuck: I'm not entirely sure why this happens sometime. I haven't been able to reproduce it.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: Another paging bug?

Just wanted to let you know that this bug still appears, my "Show new posts since last visit" page currently shows an empty page 2.

Re: Another paging bug?

I found one way to cause this.
Here's what I did with my test board:
1. Make 1 more post then my max topics per page (30 in my case, the default)
2. Go to 'Show new posts since last visit'
3. Go to the second page.
4. Delete one thread
5. Click the first page link again.

Basically, because it uses a search id, it loads results from back when there were 31 topics and uses that as num_hits but only fetches the 30 that still exist.
I'd say the best fix would be to not use num_hits from the t.id count, but instead from the actual query you do form the search (just grab $db->num_rows for that).

Re: Another paging bug?

Smartys: The problem with that is that the query might consume a lot of memory if it returns e.g. a thousand rows and we're only interested in 30 of them.

"Programming is like sex: one mistake and you have to support it for the rest of your life."