Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query Pagination Previous block appears incorrectly when navigating to page outside of the query's range. #67748

Closed
3 of 6 tasks
michalczaplinski opened this issue Dec 9, 2024 · 0 comments · Fixed by #68070
Labels
[Block] Query Loop Affects the Query Loop Block [Block] Query Pagination Affects the Query Pagination Block - used for pagination within the Query Loop Block [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@michalczaplinski
Copy link
Contributor

Description

This is a standard Query Loop block in the TT5 theme. We still show the Query Pagination Previous block whenever a user navigates to a page outside the query's range. However, as there are no results, the block does not make much sense to be shown.

Step-by-step reproduction instructions

  1. Add a Query Loop block to a page or post.
  2. Make sure that the Post Template block of the Query Loop includes a Pagination Previous block.
  3. Save your post/page.
  4. Open your post/page on the frontend.
  5. Navigate to a page that is outside of the range of the query. e.g.: http://example.com&query-5-page=99999999
  6. Note that the Previous button is visible and it works but it does not make sense to show it in this context.

Screenshots, screen recording, code snippet

Screen.Recording.2024-12-05.at.13.47.07.mov

Environment info

  • 6.8-alpha-59477
  • TT5 theme
  • Chrome
  • Gutenberg trunk

Please confirm that you have searched existing issues in the repo.

  • Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

  • Yes

Please confirm which theme type you used for testing.

  • Block
  • Classic
  • Hybrid (e.g. classic with theme.json)
  • Not sure
@michalczaplinski michalczaplinski added [Type] Bug An existing feature does not function as intended [Block] Query Loop Affects the Query Loop Block [Block] Query Pagination Affects the Query Pagination Block - used for pagination within the Query Loop Block labels Dec 9, 2024
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Query Loop Affects the Query Loop Block [Block] Query Pagination Affects the Query Pagination Block - used for pagination within the Query Loop Block [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
Projects
None yet
1 participant