Skip Navigation

[Resolved] Archive Loop Pagination with Ajax Loading New Content Above the Fold – Revisitin

This support ticket is created 2 years, 11 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 5 replies, has 2 voices.

Last updated by kennethK-4 2 years, 11 months ago.

Assisted by: Waqar.

Author
Posts
#2266867

I am trying to:
Use pagination with manual transition and ajax
Link to a page where the issue can be seen:
hidden link
I expected to see:
Loading new content on scroll with old content staying available above the fold. It used to do this and then stopped.
Instead, I got:
Just recently it started loading all new content on the page rather than keeping the initially loaded products and loading more. It does this only on the first pagination action, after that it works fine. This is connected to a previous ticket that has been closed due to my inactivity. Since then, I have tested by troubleshooting with all plugins turned off except for toolset and woocommerce and with a standard theme. The issue still persists.

#2268121

Hi,

Thank you for sharing these details.

As requested in the previous ticket, do I have your permission to download a clone/snapshot of your website?

regards,
Waqar

#2268517

Yes, go ahead and clone as needed.

#2269521

Thank you for the permission, but I keep getting the "Bad Request" error, whenever I try to install the Duplicator plugin.

Looking into your archive page's source code, I noticed that the HTML comment lines which are needed for the infinite scrolling are missing, when the page loads.

Examples of normal HTML comments which are wrapped around the infinite scrolling page results:


...
<!-- WPV_Infinite_Scroll --><!-- WPV_Infinite_Scroll_Insert -->
...     
<!-- WPV_Infinite_Scroll -->
...

Some optimization plugins and CDN services (like Cloudflare) can strip/remove the HTML comments from the page's mark-up, but if these comments are missing, the AJAX-based infinite scrolling has no way to track where the first page's results end.

As your website is also using the Cloudflare CDN service, I'll recommend consulting its official documentation or support team to see if there is a way to exclude these specific HTML comments from being removed.

#2269547

Sorry about the duplicator issue. Your analysis seems to be correct though with the html comment lines. We removed html from auto minify in the cloudflare CDN settings and it resolved the issue. Thanks for discovering that. I'll mark this as resolved.

#2269551

Thanks.