Wp-calypso: Gutenberg: Blog Posts block "More" button appears on the first block only

Created on 6 Jun 2020  路  9Comments  路  Source: Automattic/wp-calypso

When using more than one Blog Posts block with "More" button enabled, "More" button only appears on the first Blog Posts block.

Steps to reproduce

  1. Create a page or post with Blog Posts block
  2. On the right side under Displays Settings, enable Show "More" Button
  3. Insert another Blog Posts block with Show "More" button enabled.

What I expected

"More" button will be displayed in the editor, preview and post or page.

What happened instead

"More" button in Blog Posts block only appears in the page or post editor, but not in the preview, or post or page itself.

Browser / OS version

Chrome 83 / Mac 10.15.5

Screenshot / Video

Page Editor (shows the "More" button):

Screen Shot 2020-06-06 at 6 04 37 PM

Preview (does not show the "More" button):

Screen Shot 2020-06-06 at 6 05 59 PM

Page (no "More" button):

Screen Shot 2020-06-06 at 6 06 40 PM

Context / Source

user-report #manual-testing

Ticket: 3039635-zd

Blocks [Type] Bug

All 9 comments

Interestingly it's always the first block on the page that shows the button. If I re-order the blocks then the block that's now at the top of the page shows the button and the other is gone.

The problem only occurs for me when I set a category filter on the Blog Posts blocks.

The problem only occurs for me when I set a category filter on the Blog Posts blocks.

Interesting! I reproduce without any filter, but it could be something to do with the specific posts on our sites.

The more button is supposed to be hidden if either:

  • The Show "More" Button setting is disabled
  • The site is private
  • There aren't any other posts to load

I think there might be an issue with the logic of that last one, maybe something to do with this line, maybe something to do with the posts rendering above counting towards how many are posts are left for the blocks below?

I'm going to try reproducing on a dotorg site with just the newspack block, but I think that's where the root issue is.

Yes, reproducible with just the newspack block. There's an existing issue report Automattic/newspack-blocks#510

Opened a PR with potential fix Automattic/newspack-blocks#515 馃 but I'm not very familiar with the newspack blocks.

Update: Automattic/newspack-blocks#515 is progressing but will first check that the fix doesn't introduce a performance regression.

Seeing a similar issue in 3134654-zen, but only certain blocks are affected.

The Show "More" Button is enabled, the site is public, there are more posts to show in the selected categories for the affected blocks, I can see the More button in the editor, but it does not show on the site front end.

Hi @p-jackson ! I see this issue is still happening. Do you have any updates?
I see your PR got merged but the code has been changed a lot since then.

Just tested it on my test site and it works fine, but I checked the site from the zen above and the issue is still happening there.

@david-szabo97 it doesn't look like the fix has been included in the editing toolkit plugin yet, but I'm not sure why that is or how to remedy it. Seeing if I can get some help with that now p1599188128010400-slack-CRNF6A9DX

Was this page helpful?
0 / 5 - 0 ratings