This issue was originally reported by @notnownikki in 4390-wpcom-themes:
Some category pages don't load all of the posts when you're using the Toujours theme and infinite scroll.
Steps to replicate
(Kudos to @kristarella for the detailed steps)
If infinite scroll is checked:
- if social menu is enabled, More Posts button shows, but doesn't work
- if social menu is NOT enabled, all posts show (presumably up to 7 posts per infinite scroll), if fewer than 7 posts exist all show
- if widgets in footer, all posts (fewer than 7) still show
If infinite scroll is NOT checked:
- if social menu enabled, More Posts shows, but doesn't work
- if social menu NOT enabled, but footer widgets present, More Posts shows and doesn't work
- if social menu NOT enabled, and no footer widgets, More Posts shows and doesn't work
So it seems like in this scenario, the only circumstances where the More Posts button appears and works is when the posts don't have the featured tag, or the option to show the featured tag in all listings is on.
In the initial report, https://yandsfood.com/category/luxury/ is the affected page. Clicking on Older Posts doesn't return any more posts, even though there are three posts total - one more should have appeared.
The bug was reproduced by replicating the request, using curl.
Here's a curl command that uses the same form data as the theme sends, and returns no posts:
curl -X POST -H "Content-Type application/x-www-form-urlencoded" -d 'action=infinite_scroll&page=1¤tday=01.02.17&order=DESC&styles%5B%5D=wpcom-smileys&styles%5B%5D=follow_css&styles%5B%5D=hover-bubbles&styles%5B%5D=dashicons&styles%5B%5D=thickbox&styles%5B%5D=jetpack_likes&styles%5B%5D=wordads-global&styles%5B%5D=theme-menu&styles%5B%5D=the-neverending-homepage&styles%5B%5D=wpcom-admin-bar&styles%5B%5D=noticons&styles%5B%5D=wpcom-core-compat-playlist-styles&styles%5B%5D=mp6hacks&styles%5B%5D=wpcom-bbpress2-staff-css&styles%5B%5D=toujours-style&styles%5B%5D=genericons&styles%5B%5D=toujours-wpcom&styles%5B%5D=jetpack-social-menu&styles%5B%5D=wpcom_instagram_widget&styles%5B%5D=notes-admin-bar-rest&styles%5B%5D=geo-location-flair&styles%5B%5D=reblogging&styles%5B%5D=tos-report-form&styles%5B%5D=super-admin-bar&styles%5B%5D=a8c-global-print&styles%5B%5D=wpcom-masterbar-css&styles%5B%5D=wpcom-actionbar-bar&styles%5B%5D=h4-global&styles%5B%5D=widget-achievements&styles%5B%5D=jetpack-responsive-videos-style&styles%5B%5D=jetpack-carousel&styles%5B%5D=tiled-gallery&styles%5B%5D=jetpack-carousel-ie8fix&query_args%5Bcategory_name%5D=luxury&query_args%5Berror%5D=&query_args%5Bm%5D=&query_args%5Bp%5D=0&query_args%5Bpost_parent%5D=&query_args%5Bsubpost%5D=&query_args%5Bsubpost_id%5D=&query_args%5Battachment%5D=&query_args%5Battachment_id%5D=0&query_args%5Bname%5D=&query_args%5Bstatic%5D=&query_args%5Bpagename%5D=&query_args%5Bpage_id%5D=0&query_args%5Bsecond%5D=&query_args%5Bminute%5D=&query_args%5Bhour%5D=&query_args%5Bday%5D=0&query_args%5Bmonthnum%5D=0&query_args%5Byear%5D=0&query_args%5Bw%5D=0&query_args%5Btag%5D=&query_args%5Bcat%5D=106159&query_args%5Btag_id%5D=&query_args%5Bauthor%5D=&query_args%5Bauthor_name%5D=&query_args%5Bfeed%5D=&query_args%5Btb%5D=&query_args%5Bpaged%5D=0&query_args%5Bmeta_key%5D=&query_args%5Bmeta_value%5D=&query_args%5Bpreview%5D=&query_args%5Bs%5D=&query_args%5Bsentence%5D=&query_args%5Btitle%5D=&query_args%5Bfields%5D=&query_args%5Bmenu_order%5D=&query_args%5Bembed%5D=&query_args%5Bposts_per_page%5D=2&query_args%5Bignore_sticky_posts%5D=false&query_args%5Bsuppress_filters%5D=false&query_args%5Bcache_results%5D=false&query_args%5Bupdate_post_term_cache%5D=true&query_args%5Blazy_load_term_meta%5D=true&query_args%5Bupdate_post_meta_cache%5D=true&query_args%5Bpost_type%5D=&query_args%5Bnopaging%5D=false&query_args%5Bcomments_per_page%5D=50&query_args%5Bno_found_rows%5D=false&query_args%5Border%5D=DESC&last_post_date=2017-02-01+16%3A31%3A36' https://yandsfood.com/?infinity=scrolling
Further investigation revealed that any attempt to filter using the 'luxury' category (either by name or by ID) brings back nothing.
curl -X POST -H "Content-Type application/x-www-form-urlencoded" -d 'action=infinite_scroll&page=1¤tday=01.02.17&order=DESC&styles%5B%5D=wpcom-smileys&styles%5B%5D=follow_css&styles%5B%5D=hover-bubbles&styles%5B%5D=dashicons&styles%5B%5D=thickbox&styles%5B%5D=jetpack_likes&styles%5B%5D=wordads-global&styles%5B%5D=theme-menu&styles%5B%5D=the-neverending-homepage&styles%5B%5D=wpcom-admin-bar&styles%5B%5D=noticons&styles%5B%5D=wpcom-core-compat-playlist-styles&styles%5B%5D=mp6hacks&styles%5B%5D=wpcom-bbpress2-staff-css&styles%5B%5D=toujours-style&styles%5B%5D=genericons&styles%5B%5D=toujours-wpcom&styles%5B%5D=jetpack-social-menu&styles%5B%5D=wpcom_instagram_widget&styles%5B%5D=notes-admin-bar-rest&styles%5B%5D=geo-location-flair&styles%5B%5D=reblogging&styles%5B%5D=tos-report-form&styles%5B%5D=super-admin-bar&styles%5B%5D=a8c-global-print&styles%5B%5D=wpcom-masterbar-css&styles%5B%5D=wpcom-actionbar-bar&styles%5B%5D=h4-global&styles%5B%5D=widget-achievements&styles%5B%5D=jetpack-responsive-videos-style&styles%5B%5D=jetpack-carousel&styles%5B%5D=tiled-gallery&styles%5B%5D=jetpack-carousel-ie8fix' https://yandsfood.com/?infinity=scrolling
... bring back posts, but ...
curl -X POST -H "Content-Type application/x-www-form-urlencoded" -d 'action=infinite_scroll&page=1¤tday=01.02.17&order=DESC&styles%5B%5D=wpcom-smileys&styles%5B%5D=follow_css&styles%5B%5D=hover-bubbles&styles%5B%5D=dashicons&styles%5B%5D=thickbox&styles%5B%5D=jetpack_likes&styles%5B%5D=wordads-global&styles%5B%5D=theme-menu&styles%5B%5D=the-neverending-homepage&styles%5B%5D=wpcom-admin-bar&styles%5B%5D=noticons&styles%5B%5D=wpcom-core-compat-playlist-styles&styles%5B%5D=mp6hacks&styles%5B%5D=wpcom-bbpress2-staff-css&styles%5B%5D=toujours-style&styles%5B%5D=genericons&styles%5B%5D=toujours-wpcom&styles%5B%5D=jetpack-social-menu&styles%5B%5D=wpcom_instagram_widget&styles%5B%5D=notes-admin-bar-rest&styles%5B%5D=geo-location-flair&styles%5B%5D=reblogging&styles%5B%5D=tos-report-form&styles%5B%5D=super-admin-bar&styles%5B%5D=a8c-global-print&styles%5B%5D=wpcom-masterbar-css&styles%5B%5D=wpcom-actionbar-bar&styles%5B%5D=h4-global&styles%5B%5D=widget-achievements&styles%5B%5D=jetpack-responsive-videos-style&styles%5B%5D=jetpack-carousel&styles%5B%5D=tiled-gallery&styles%5B%5D=jetpack-carousel-ie8fix&query_args%5Bcategory_name%5D=luxury' https://yandsfood.com/?infinity=scrolling
... does not.
@sixhours commented:
The user has a Featured Content tag, top, which is set in Customize -> Featured Content.
"Display tag content in all listings." in this section is unchecked, so it's likely one of the posts in the Luxury category also has the "top" tag set. This appears to be true, the Plane post has the "top" tag: https://yandsfood.wordpress.com/wp-admin/edit.php?category_name=luxury
So checking "Display tag content in all listings." will fix the issue for this user, but it doesn't explain why the wrong post is missing from the listings; it should be the Plane post missing, but it's the Hotel post (the last post in the category) instead. This is likely a Jetpack Featured Content / Infinite Scroll bug, not specific to the theme.
And in another comment:
I recall hearing about an issue with Jetpack Social Menu from a premium theme shop when I was working on their review...
Normally we'd check to see if a social menu was active before turning infinite scroll off, but the Jetpack social menu is implemented after the infinite scroll scripts have already run. I wonder if this is messing up the infinite scroll implementation in all these themes.
We also had a report of a similar issue in another theme: 1827-wpcom-premium-themes, and it is reproduceable in Shoreditch, Dyad and Sketch.