Skip to content

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

Closed

Description

@michalczaplinski

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

Activity

  1. added
    [Type] Bug
    [Block] Query Loop
    [Block] Query Pagination
    on Dec 9, 2024
  2. added
    [Status] In Progress
    on Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Block] Query Loop[Block] Query Pagination[Status] In Progress[Type] Bug

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions