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 block is output when empty #30522

Closed
andersnoren opened this issue Apr 6, 2021 · 3 comments · Fixed by #35092
Closed

Query Pagination block is output when empty #30522

andersnoren opened this issue Apr 6, 2021 · 3 comments · Fixed by #35092
Assignees
Labels
[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

@andersnoren
Copy link

Description

The wrapping div of the Query Pagination block is output when there are no previous/next/number links to display in it, which can result in extra margins on the page. It's extra noticeable if the block has a custom block style, like this one with vertical borders:

image

The screenshot shows a custom theme with a custom block style applied, but it behaves the same in TT1 Blocks without the block style.

Step-by-step reproduction instructions

  1. Activate TT1 Blocks.
  2. Set the "Blog pages show at most" option in Settings → Reading to a higher number than the number of posts on the site.
  3. View the blog and inspect the Query Pagination block.

Expected behaviour

The wrapping div of the Query Pagination block shouldn't be output when empty.

Actual behaviour

The wrapping div is output when the block is empty.

WordPress information

  • WordPress version: 5.7
  • Gutenberg version: 10.3.1
  • Are all plugins except Gutenberg deactivated? Yes
  • Are you using a default theme (e.g. Twenty Twenty-One)? Yes, TT1 Blocks

Device information

  • Device: Desktop
  • Operating system: MacOS
  • Browser: Safari 14.0.3
@ntsekouras ntsekouras added [Block] Query Pagination Affects the Query Pagination Block - used for pagination within the Query Loop Block [Type] Bug An existing feature does not function as intended labels Apr 6, 2021
@alaczek
Copy link

alaczek commented Jun 9, 2021

I wasn't able to reproduce but I might be missing something.

View the blog and inspect the Query Pagination block.

How exactly did you create/set up the blog?

@Mamaduka
Copy link
Member

Mamaduka commented Sep 8, 2021

It should be fixed via #33635.

@Mamaduka
Copy link
Member

Hi, @andersnoren

I just merged PR that fixes this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[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
Development

Successfully merging a pull request may close this issue.

4 participants