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

Blog Posts Block: Load More Posts button doesn't appear even though there are more posts to load #404

Closed
susanjanec opened this issue Mar 10, 2020 · 40 comments · Fixed by #672 or Automattic/wp-calypso#49493
Assignees
Labels
[Block] Homepage Posts bug Something isn't working Involves Happiness This issue was created by a Happiness Engineer or contributed to by a Happiness Engineer released on @alpha released

Comments

@susanjanec
Copy link

susanjanec commented Mar 10, 2020

Describe the bug
User is using a blog post block to display posts to 5 posts at a time. The Load More button does appear as expected for the next 5 posts, but it doesn't seem to appear after the 2nd time even though there are more posts.

When I tested this on my own site, at a certain point when trying to click on the Load More button for more posts, the Load More button will stop appearing, even though there are still more posts that can load.

Screenshare/Screenshot

https://d.pr/i/AjoWdA
https://d.pr/i/ADm2an

To Reproduce
Steps to reproduce the behavior: I tested this on my own site: https://susanjane.blog/testing-blog-posts-block/

  1. Click on Load More Posts to load next 5 posts, then again, and then again.
  2. The last post at the bottom should be BIRTHDAY BOOK CLUB which is not the last post published (there are more before this). You won't see the Load More Posts button, however, there are 12 published posts before this post, so the Load More Posts button should appear to display more posts.

Expected behavior
The Load More Posts button should appear at the bottom to load the next 5 posts until there are no more published posts to display. For Reference, on my site, the last published post should be titled The Coolest Hair

@susanjanec susanjanec added the bug Something isn't working label Mar 10, 2020
@susanjanec
Copy link
Author

Report on 2772505-zen

@SiobhyB
Copy link

SiobhyB commented Mar 12, 2020

I was able to replicate this also after another report in 19354723-hc.

@susanjanec
Copy link
Author

Another report in 20142631-hc

@pauljacobson
Copy link

We have another report of this issue in 2978696-zen

The user has enabled the "Show more posts" option, but the button doesn't display on the page. See here:

Screen Shot 2020-05-16 at 12 57 43 PM

This is how the page renders:

Screen Shot 2020-05-17 at 09 43 38

@sdixon194
Copy link

Another case in 21234195-hc.

@zdenys
Copy link

zdenys commented Jun 4, 2020

@zdenys zdenys changed the title Load More Posts button doesn't appear even though there are more posts to load Blog Posts Block: Load More Posts button doesn't appear even though there are more posts to load Jun 4, 2020
@villanovachile
Copy link

Just had this issue in 3037601-zen / 21670415-hc

I've done some pretty extensive testing on this, and can reproduce the issue as follows:

Make 60 posts (using a plugin such as FakerPress)

Create a Blog Posts Block with Load More enabled in Display Settings. When changing the number of items, clicking Load More eventually stops loading posts and are capped as follows:

Number of Items - 5, posts are capped at 30

Number of items - 10, posts are capped at 40

Number of items - 11, posts are capped at 33

Number of items - 12, posts are capped at 36

Number of items - 13, posts are capped at 39

Number of items - 14, posts are capped at 42

Number of items - 15, posts are capped at 45

Number of items - 16, posts are capped at 48

Number of items - 17, posts are capped at 48

Number of items - 20, posts are capped at 40

As you can see, there appears to be a direct correlation with the number of Items entered, so that the total number of posts to be displayed using "Load More" is evenly divided by the number of items entered. Any remainder posts are not displayed.

There are a few exceptions to this, such as when items to be displayed are 5, 10, or 20, which appears to have a hard cap at 40.

This issue occurs regardless of theme, or using Calypso/WP Admin dashboards.

@eoinsav
Copy link

eoinsav commented Jul 29, 2020

Another report in 21211534-hc

The user has 38 Posts and the Blog Post Block set to display 5 Posts at a time. They stopped loading at 25 and the Load More button disappeared.

It kept stopping at a random number of Posts no matter how many were chosen to load at a time.

@tbradsha
Copy link

6889940-hc

@katiebethbrown
Copy link

3262479-zd-woothemes

@katiebethbrown katiebethbrown added the Involves Happiness This issue was created by a Happiness Engineer or contributed to by a Happiness Engineer label Aug 29, 2020
@tanjoymor
Copy link

3282681-zd

@paulostp
Copy link

3329555-zd

@fresatomica
Copy link

Another report of this here.

It seems like this issue was also mentioned here: #438

@pbking
Copy link

pbking commented Oct 12, 2020

+1
23710523-hc and #3398373-zen

@villanovachile
Copy link

another report: 25108946-hc and 3432130-zen

@supernovia
Copy link

Looks like there are a few related issues open, but this one has the best number, so, noting this case:

https://wordpress.com/forums/topic/cant-see-my-older-post/#post-3583034

@supernovia
Copy link

We have another case here:
https://wordpress.com/forums/topic/all-the-posts-are-not-showing-up/

Any idea who we need to ping on this?

@soatok
Copy link

soatok commented Nov 13, 2020

Each press of the "Load More" button appends another ID to the exclude parameter, and the page number keeps getting increased too. Because both mechanisms are being triggered, the "what's the next URL?" is probably short-circuiting at approximately half the number of posts.

(I set the number to show per page to 1 to study the incremental behavior, and specifically the HTTP request parameters.)

If the next URL in the JSON response body is empty, the "Load More Posts" button gets hidden.

soatok added a commit to soatok/newspack-blocks that referenced this issue Nov 13, 2020
@soatok soatok mentioned this issue Nov 13, 2020
6 tasks
@soatok
Copy link

soatok commented Nov 13, 2020

I proposed a workaround in #628 but the full, correct fix might be a little more involved.

@supernovia
Copy link

Thanks for that @soatok . I ran into another case here today:
https://wordpress.com/support/import/#import-content-from-another-platform

@synora
Copy link

synora commented Dec 21, 2020

Another report. 3591685-zen.

@iamgabrielma
Copy link

Another one at 3602566-zen

@donalirl
Copy link

donalirl commented Jan 5, 2021

Another case in #26727364-hc and there are similar reports in #438 and Automattic/wp-calypso#48598

@soatok
Copy link

soatok commented Jan 6, 2021

Considering cases keep coming in, we know what's causing it, and have a possible fix for it, what's blocking Automattic from applying the fix?

@dkoo dkoo self-assigned this Jan 11, 2021
@hngdny
Copy link

hngdny commented Jan 14, 2021

Another report on #26984312-hc

@matticbot
Copy link
Contributor

🎉 This issue has been resolved in version 1.18.1-alpha.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@matticbot
Copy link
Contributor

🎉 This issue has been resolved in version 1.18.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@soatok
Copy link

soatok commented Jan 20, 2021

I'm glad to see this fixed.

Final question: What's the usual Github Release -> Patch Deployed timeline for WordPress.com users? (i.e. when can we expect to see this fixed?)

@dkoo
Copy link
Contributor

dkoo commented Jan 21, 2021

@soatok I'll update this thread once you can expect to see the fix on WordPress.com.

@dcoleonline
Copy link

Just noting that another report happened in 27164170-hc on WordPress.com

@foosantos
Copy link
Member

One more report on 27165318-hc (follow-up 3673082-zen).

@supernovia
Copy link

Yay! Thanks! We'll need to follow up here once that's out:
https://wordpress.com/forums/topic/load-more-posts-doesnt-load-all-posts/

@kdevnel
Copy link

kdevnel commented Jan 26, 2021

Awesome news on this! Thanks for the work for a resolution. Noting to follow-up with 3674661-zd-woothemes once this is live on WP.com

@supernovia
Copy link

@thesacredpath
Copy link

Will need to follow up here as well: 3685981-zen

@jerrysarcastic
Copy link

Also reported in https://wordpress.com/forums/topic/free-blog-not-showing-oldest-posts/

Noting here so we can follow up

@dkoo
Copy link
Contributor

dkoo commented Jan 28, 2021

I'm working on getting this fix synced downstream to WP.com. We'll need to land this PR first: #677

I'll update this issue as I have more info on timing.

@supernovia
Copy link

Thanks @dkoo . We're mostly noting issues so we can follow up with the users once it's out. 🥳

@dkoo
Copy link
Contributor

dkoo commented Jan 30, 2021

Opened a PR to pull these changes into WP Calypso: Automattic/wp-calypso#49493

@dkoo
Copy link
Contributor

dkoo commented Feb 4, 2021

Just to close the loop on this, the Load More fix has been deployed to WP.com. (It introduced some more regressions, but that's for another time. 🤣)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Homepage Posts bug Something isn't working Involves Happiness This issue was created by a Happiness Engineer or contributed to by a Happiness Engineer released on @alpha released
Projects
None yet