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)
[Please describe this bug in as much detail as possible so we can replicate & debug this bug]
I’m actually on Bricks V 2.0.2 (not an option to select in tags) Not sure if I’ve hit a weird Bricks bug, or if there’s a fix for this
I have 2+ CPTs - books & services
I have a component of a post-sidebar that appears on the single post page, the category archive page, the blog page and some service pages.
In the sidebar I do a query loop for services to list them, I do another query loop for books to list them and a final query loop to list the recent posts.
Today I created the category archive template and put the post-sidebar component in it.
I’m at a loss as to why it’s not working - but on the category archive page there are no services and no books being displayed.
I’ve disabled the query merge on the recent posts query loop so that pulls back all the posts correctly.
If I do a disable query merge on the books or services query loop, then it starts pulling back blog posts and ignoring that I’ve specified the loop should be on the post types of books or services.
The sidebar component doesn’t have any arguments, so nothing should be different between this and the pages the sidebar is on… eg Blog – Todays Empowered Woman
thank you for the video. The reason why the “query loop things” dissapeard is because you (unknowingly) turned that off:
Books at around 2:40min
Posts at 2:55min.
From the video, I can see the Posts loop was working correctly, right (before the query loop got toggled off). If that’s the case, turning on “Disable query merge” should work. If that’s not the case, then I, once again, failed to recognize the issue.
Yes I realized that - I did put that into the video right at the end (had to record an extra bit of video once I realized what happened).
No it isn’t working - sorry but you’ve not understood the issue - I did show in the video doing a “disable query merge” doesn’t work - all that does is stop my 2 queries from running on my 2 CPTs and instead makes them run on my blog posts for some weird reason - so instead of getting 4 books, or 4 services back and I get blog posts returned instead - that’s what my problem is, not that I clicked too close the toggle and turned it off by mistake.
Your video did not show the query loop results when “Disable query merge” was enabled for the books and services query loops. When you enabled “Disable query merge”, the query loop was turned off. Later in the video, when you turned the query loop back on, “Disable query merge” was no longer enabled:
Ah ok - didn’t realize that - I must have done the exact same thing the 10+ times I tested it before doing the video too - thank you for the catch!
That has solved it - Thank you to Matej too