DUPLICATE: Query loop on term archive templates breaks when loading more using AJAX

Browser: Chrome 110
OS: macOS
URL: https://civicparticipation.ro/category/updates/
Video: Short screen recording that illustrates this issue (free tool: jam.dev)

Steps to replicate the bug:

  1. Create a term archive template.
  2. Create your query for that archive
  3. Add any AJAX-based load more, infinite scroll or pagination.
  4. Any time you load more, the query does not take into account the term archive you’re currently on and instead loads posts from all the terms.

In the example I’ve linked, you can clearly see you’re on the Updates archive, but when you click load more Reports and Events also appear.

This bug is a deal-breaker for absolutely any site that has more products, posts, or archives, since displaying all posts from the beginning is not an option, and non-ajax pagination has its issues on pages with more than one query.

Please let me know if you require further information.

Hi there,

This is a known bug when you are using Query Filters feature.

Kindly follow this thread for update WIP: Search Filter: doesn't reset scope correctly when using product archive template

It’s the same issue, on term pages, the current term is not being applied to filter results.

You can avoid this issue if remove all the filters that targeting the query 9fd504

Regards,
Jenn

Hello,

I’ve been having the same issue with ajax pagination on a website that does not use any filtering whatsoever.

Every time I load a new page via ajax all the results get mashed up in the same archive, without respecting the term. So in that regard, term archives have the same problem filters do with ajax.

Hi @blureogroup ,

You are right, the pagination element is considered one of the filter elements once you turned on Query filters feature in Bricks > Settings.

Can you try turn it off and check the AJAX pagination results again?

Regards,
Jenn

Hello again, @itchycode,

Thank you very much for the reply. I can confirm that having disabled filtering from the Bricks Builder settings, I can now load more query items via AJAX without any problems on the term archives.

I know filtering is still experimental in Bricks, but I genuinely love how it works when it does work. Hopefully fixing these issues gets prioritised since it’s a killer feature for a builder to have native filtering.

Have a great day!
Tudor.

1 Like