-
-
Notifications
You must be signed in to change notification settings - Fork 15
Specifying Page on Search #58
Comments
Can you report where is the code of that issue? Thanks. |
Whatever change fixes should likely be made in the other locations we handle pagination. But as for what the issue was originally created for You can see where the But additional pagination occurs in |
I'm taking a look at it. The issue might be in the if (page !== 1) {
offset = page * paginated_amount;
} Let's set But for page 2 you get limit 10 and offset 20? Shouldn't be limit 10 and offset 10? So: if (page > 1) {
offset = (page - 1) * paginated_amount;
} |
@Digitalone1 ya know I think this is it! Great find, I'll fix that today, but pretty sure that would be the root of the issue. Don't know how I didn't catch that |
@confused-Techie This has been fixed, right? |
I'll probably double check in a moment, but pretty sure initial testing from what you proposed fixed this issue |
If a Search is executed that only has a single page of results, and the query passes
page=1
as a non-programmer would, then they are given a not found result, since the database is trying to find the 1st page of results from a zero-indexed position.This should be resolved in a such a way to allow this to happen.
Or otherwise to investigate further with how Atom.io implements this feature and mirror that functionality.
The text was updated successfully, but these errors were encountered: