Welcome to Geeklog Tuesday, December 11 2018 @ 12:40 pm EST

Geeklog Forums

Minor Search bug


Status: offline

jmucchiello

Forum User
Full Member
Registered: 29/08/05
Posts: 985
If there are exactly 10 items (or a multiple thereof) in the search results, the search page still displays a "1 2 next" navigation links even though there is no next page. Hitting next gives you an empty search result.

Status: offline

Dirk

Site Admin
Admin
Registered: 12/01/02
Posts: 13073
Location:Stuttgart, Germany
Actually, that's more or less intentional. To know in advance that there are no results for the next page would require another SQL request to count the total number of results - and this is to be avoided since it can time out on large sites.

I guess it could be fixed by requesting 11 instead of 10 results per page - you would still display only 10 but know whether or not there's another page. Sounds easier than it is to implement, though, so don't hold your breath ...

bye, Dirk

All times are EST. The time is now 12:40 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content