Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

londoh's avatar

Issue with pagination

@JeffreyWay - A Happy New Year to you.

It looks like there's an issue with pagination.

There's a long running thread titled "Where are you all from". Somebody just posted and at this time the "Updated" link goes to page 18: https://laracasts.com/discuss/channels/general-discussion/where-are-you-all-from?page=18

But page 18 doesnt exist and the last post is on page 17.

However while I have your attention - there's another issue here: Isnt it the case that the "Updated" link should go to the last post and not the last page? Well at least it used to pre-update.

Please refer to this report I made a while back:

https://laracasts.com/discuss/channels/site-improvements/channel-list-updated-link

regards,

l.

0 likes
4 replies
londoh's avatar

@JeffreyWay Jeff

This is a about a bug in your forum code. Please consider this a bug report.

Maybe I havent been clear enough to explain it. So I'll try again:

The "pagination" I'm talking about here is the forum pagination for the "Updated" link, which displays below the thread title on the Conversations listing page.

There is most probably an "off by one" error in there somewhere. Because when there are multiples of exactly 15 posts in a thread the link is to the the last page - PLUS ONE

eg: if a thread has 15 posts the "Updated" link will be to page 2. But page 2 has no post, the last post is on page 1

eg: if a thread has 30 posts the "Updated" link will be to page 3. But page 3 has no post, the last post is on page 2

etc. etc.

To find an example I just looked back and found this thread on page 12 as of AM UK time:

https://laracasts.com/discuss?page=12

Thread title: "Auto selecting the tag based on database informations "

https://laracasts.com/discuss/channels/eloquent/auto-selecting-the-select-tag-based-on-database-informations

In this case the link reads "Updated 1 Day Ago" and links to Page 2 - where there is no post. The last post is on Page 1.

It probably wont be on /discuss?page=12 for long. But hopefully thread hasnt been updated and you can see what I mean.

Otherwise look thru listings pages to find any thread with 15 or 30 or 45 posts and it will show the same error.

Hopefully thats clear enough.

Regards

l.

Jaytee's avatar

Clearly Jeffrey hasn't responded. Submit a ticket on the site and you'll get a response through there.

Please or to participate in this conversation.