WIP: Infinite scroll on query loop not working with Polylang when templates are not set to translate

Browser: Chrome 110
OS: macOS / Windows / Linux / etc.
URL: Link to a page that illustrates this issue
Video: Short screen recording that illustrates this issue (free tool: jam.dev)

I have an Archive template that I use for my blog and also for a custom post type archive. Everything is working fine, pagination, and also ajax loading, but infinite scroll is trying to find new posts and it fails.
This is the payload it sends:

lang: "es"
nonce: "7397eca125"
page: 6
postId: "0"
queryElementId: "aorkjq"
queryVars: "{\"paged\":5,\"post_type\":\"portfolio_page\",\"lang\":\"es\",\"infinite_scroll_margin\":\"300\",\"ajax_loader_animation\":\"ripple\",\"ajax_loader_selector\":\"#brxe-yhdivh\",\"is_archive_main_query\":true,\"no_results_template\":\"115\",\"post_status\":\"publish\",\"posts_per_page\":\"10\"}"

It seems that doesn’t find the template, I don’t know if it may be because the postId it’s 0.

The response is:

error: "Template data not found"
html: ""
styles: ""

Also, I’m not translating this post type. But translating it same happens.

In category archives it doesn’t work too (of both, pots and custom post type)

Only works on the blog page.

Hi @salwebs,

Thank you for your report!

Would it be possible to share temporary admin access to help@bricksbuilder.io so we can investigate the issue on your site? Please include a link to this forum thread in your email so we can track it.

already created! thanks

Hi @salwebs,

I don’t see any emails with this forum thread’s link in our inbox. Can you please double check if the email was delivered to the correct address?

Thanks for fixing it. They fix it on my site. I writing this in case other people has the same problem so you can let us know when this is going to be fixed.

Best

1 Like