question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

saber-plugin-query-posts: Pagination 'next' and 'prev' links seems to be incorrect

See original GitHub issue

Bug report

Steps to reproduce

Fresh install Saber, install and followed saber-plugin-query-posts readme to make a blog post with pagination.

What is expected?

On the first paginated page, hasNext should be true, hasPrev should be false, same for nextLink and prevLink

Screenshot from 2019-11-08 14-24-58

What is actually happening?

hasNext and hasPrev seems to be reversed

Screenshot from 2019-11-08 14-36-15 First page

Screenshot from 2019-11-08 14-36-39 Second page

Other relevant information

  • Result of running saber -v: latest
  • Browser version (optional): Chromium version 78.0.3904.87 (Official Build) Arch Linux (64-bit)
  • Is Saber a global or local install? Local
  • Which package manager did you use for the install? NPM
  • Does this issue occur when all plugins are disabled? No

Awesome Saber! ⚡

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
egoistcommented, Nov 8, 2019

Maybe we should reverse that, it seems everyone else is using next for older stuff 😅

1reaction
andreasvirkuscommented, Nov 8, 2019

I think it’s showing the latest posts first, therefore hasPrev would mean has previous posts? As you can see, The order of the posts is

My Example Post 4
My Example Post 3
My Example Post 2

Therefore it’s a question of semantics and not really a bug. You could rename the Prev Page link to read Older posts instead, and the behaviour would be correct, right?

Read more comments on GitHub >

github_iconTop Results From Across the Web

saber.js - Bountysource
saber -plugin-query-posts: Pagination 'next' and 'prev' links seems to be incorrect $ 0 ... Created 2 years ago in saberland/saber with 5 comments....
Read more >
No pagination but prev and next link in meta - WordPress.org
I have a question about the yoast pagination. I added a new wp_query like this: $args = array( 'post_type' => 'mycpt', 'posts_per_page' =>...
Read more >
pagination - Wordpress next_posts_link Linking to wrong URL
Here is my idea of creating links to the next and previous pages in your custom query. If you look closely, you will...
Read more >
Next / previous posts link doesn't show up with Posts 2 Posts
From next_posts_link : Add the $max_pages parameter to the next_posts_link() function when querying the loop with WP_Query.
Read more >
What site owners should know about Google's August 2019 ...
Core updates and reassessing content. There's nothing wrong with pages that may perform less well in a core update. They haven't violated our...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found