# SOLVED: The query loop in the component is not working as expected

**URL:** <https://forum.bricksbuilder.io/t/solved-the-query-loop-in-the-component-is-not-working-as-expected/28920>\
**Category:** Bugs\
**Tags:** v1-12-beta\
**Created:** [December 22, 2024, 3:35pm UTC](https://forum.bricksbuilder.io/t/solved-the-query-loop-in-the-component-is-not-working-as-expected/28920 "2024-12-22T15:35:10Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![HOSEIN](https://forum.bricksbuilder.io/user_avatar/forum.bricksbuilder.io/hosein/32/25907_2.png) [@HOSEIN](https://forum.bricksbuilder.io/u/HOSEIN)\
**Post date:** [December 22, 2024, 3:35pm UTC](https://forum.bricksbuilder.io/t/solved-the-query-loop-in-the-component-is-not-working-as-expected/28920/1 "2024-12-22T15:35:10Z")

</div>

**Browser** : Chrome 131.0.6778.205  
**OS** : Windows

Hi bricks team,

If we convert the query loop to a component, the main item does not render properly. I have not tested this on posts. But it is problematic on products.

 ![Component](https://forum.bricksbuilder.io/uploads/default/original/3X/a/c/ac6895edf87f87351392bb5f93bbc8b9fc4fb199.png)

---

<div class="post-metadata">

**Author:** ![Matej](https://forum.bricksbuilder.io/user_avatar/forum.bricksbuilder.io/matej/32/20184_2.png) [@Matej](https://forum.bricksbuilder.io/u/Matej)\
**Post date:** [December 22, 2024, 8:32pm UTC](https://forum.bricksbuilder.io/t/solved-the-query-loop-in-the-component-is-not-working-as-expected/28920/2 "2024-12-22T20:32:34Z")

</div>

Hi @HOSEIN,

would it be possible if you can export the component so that I can test locally? I would like to have your exact setup of component, to reproduce this.

Thanks.  
Matej

---

<div class="post-metadata">

**Author:** ![HOSEIN](https://forum.bricksbuilder.io/user_avatar/forum.bricksbuilder.io/hosein/32/25907_2.png) [@HOSEIN](https://forum.bricksbuilder.io/u/HOSEIN)\
**Post date:** [December 22, 2024, 11:46pm UTC](https://forum.bricksbuilder.io/t/solved-the-query-loop-in-the-component-is-not-working-as-expected/28920/3 "2024-12-22T23:46:52Z")

</div>

Hi,

> **[bricks-component-gixege-loop-item.json](https://drive.google.com/file/d/1r9ljXjCueAjwwAf8gfJtTkGCLPeePV8z/view?usp=sharing)**
>
> Google Drive file.

While reviewing this report, I encountered another problem that appears to be a bug…

If we import this Component, the query loop in it will be reset. Is this normal behavior?

---

<div class="post-metadata">

**Author:** ![Matej](https://forum.bricksbuilder.io/user_avatar/forum.bricksbuilder.io/matej/32/20184_2.png) [@Matej](https://forum.bricksbuilder.io/u/Matej)\
**Post date:** [December 23, 2024, 4:03pm UTC](https://forum.bricksbuilder.io/t/solved-the-query-loop-in-the-component-is-not-working-as-expected/28920/4 "2024-12-23T16:03:06Z")

</div>

Hi @HOSEIN,

thank you. I was able to replicate the issue and I’ve opened another bug report internally. We will update this topic once we release a fix.

About the query loop issue, can you open a new topic, please? I’ve created an internal task, but I would like to connect it to the new forum topic, not this one, as it’s already containing a bug 🙂

Thanks,  
Matej

---

<div class="post-metadata">

**Author:** ![HOSEIN](https://forum.bricksbuilder.io/user_avatar/forum.bricksbuilder.io/hosein/32/25907_2.png) [@HOSEIN](https://forum.bricksbuilder.io/u/HOSEIN)\
**Post date:** [December 23, 2024, 4:59pm UTC](https://forum.bricksbuilder.io/t/solved-the-query-loop-in-the-component-is-not-working-as-expected/28920/5 "2024-12-23T16:59:44Z")

</div>

Yes, I will definitely do that. Thanks for the review.

---

<div class="post-metadata">

**Author:** ![Matej](https://forum.bricksbuilder.io/user_avatar/forum.bricksbuilder.io/matej/32/20184_2.png) [@Matej](https://forum.bricksbuilder.io/u/Matej)\
**Post date:** [January 23, 2025, 1:00pm UTC](https://forum.bricksbuilder.io/t/solved-the-query-loop-in-the-component-is-not-working-as-expected/28920/6 "2025-01-23T13:00:16Z")

</div>

Hi @HOSEIN,

We’ve fixed this in Bricks 1.12, now available as a one-click download from your dashboard.

Please let us know if you are still experiencing issues.

You can see the full changelog here: [Bricks 1.12 Changelog – Bricks](https://bricksbuilder.io/release/bricks-1-12/)

Best regards,  
Matej

---

<div class="post-metadata">

**Author:** ![HOSEIN](https://forum.bricksbuilder.io/user_avatar/forum.bricksbuilder.io/hosein/32/25907_2.png) [@HOSEIN](https://forum.bricksbuilder.io/u/HOSEIN)\
**Post date:** [January 23, 2025, 5:05pm UTC](https://forum.bricksbuilder.io/t/solved-the-query-loop-in-the-component-is-not-working-as-expected/28920/7 "2025-01-23T17:05:59Z")

</div>

Hi Matej,

This bug is present in the official 1.12 release

---

<div class="post-metadata">

**Author:** ![Matej](https://forum.bricksbuilder.io/user_avatar/forum.bricksbuilder.io/matej/32/20184_2.png) [@Matej](https://forum.bricksbuilder.io/u/Matej)\
**Post date:** [January 24, 2025, 7:53am UTC](https://forum.bricksbuilder.io/t/solved-the-query-loop-in-the-component-is-not-working-as-expected/28920/8 "2025-01-24T07:53:24Z")

</div>

HI @HOSEIN,

actually, I see now that there are two reports on this topic. Which one is still present for you?

First one (should be fixed, right?)

> [@HOSEIN](#):
>
> If we convert the query loop to a component, the main item does not render properly. I have not tested this on posts. But it is problematic on products.
> 
> ![Component](https://forum.bricksbuilder.io/uploads/default/original/3X/a/c/ac6895edf87f87351392bb5f93bbc8b9fc4fb199.png)

Or second one (which was overlooked when I was solving this topic):

> [@HOSEIN](#):
>
> [bricks-component-gixege-loop-item.json - Google Drive](https://drive.google.com/file/d/1r9ljXjCueAjwwAf8gfJtTkGCLPeePV8z/view?usp=sharing)
> 
> While reviewing this report, I encountered another problem that appears to be a bug…
> 
> If we import this Component, the query loop in it will be reset. Is this normal behavior?

Thank you,  
Matej.

---

<div class="post-metadata">

**Author:** ![HOSEIN](https://forum.bricksbuilder.io/user_avatar/forum.bricksbuilder.io/hosein/32/25907_2.png) [@HOSEIN](https://forum.bricksbuilder.io/u/HOSEIN)\
**Post date:** [January 24, 2025, 8:29am UTC](https://forum.bricksbuilder.io/t/solved-the-query-loop-in-the-component-is-not-working-as-expected/28920/9 "2025-01-24T08:29:13Z")

</div>

Hi Matej,

> First one (should be fixed, right?)

No. The First one report still occurs. In fact, in the elements I used inside the Loop, only the image and the product price have problems rendering.

But the second report is resolved. When I import a component where query loop is enabled, the query settings are not reset and it works as expected.

---

<div class="post-metadata">

**Author:** ![Matej](https://forum.bricksbuilder.io/user_avatar/forum.bricksbuilder.io/matej/32/20184_2.png) [@Matej](https://forum.bricksbuilder.io/u/Matej)\
**Post date:** [January 24, 2025, 9:08am UTC](https://forum.bricksbuilder.io/t/solved-the-query-loop-in-the-component-is-not-working-as-expected/28920/10 "2025-01-24T09:08:09Z")

</div>

Ah, thanks for the input. I’ll review both again, and create/update appropriate tasks internally.

Thank you,  
Matej

---

<div class="post-metadata">

**Author:** ![Matej](https://forum.bricksbuilder.io/user_avatar/forum.bricksbuilder.io/matej/32/20184_2.png) [@Matej](https://forum.bricksbuilder.io/u/Matej)\
**Post date:** [January 27, 2025, 2:09pm UTC](https://forum.bricksbuilder.io/t/solved-the-query-loop-in-the-component-is-not-working-as-expected/28920/11 "2025-01-27T14:09:23Z")

</div>

Hi @HOSEIN,

In your case, what’s the component that you use? I tried to replicate it now, and while I can replicate the issue for the Product price element (if does not render for the first element), the image element works totally fine.

Is the image element not working for you? Even if you recreate the component now, in 1.12.1 version?

Thank you,  
Matej

---

<div class="post-metadata">

**Author:** ![HOSEIN](https://forum.bricksbuilder.io/user_avatar/forum.bricksbuilder.io/hosein/32/25907_2.png) [@HOSEIN](https://forum.bricksbuilder.io/u/HOSEIN)\
**Post date:** [January 27, 2025, 3:14pm UTC](https://forum.bricksbuilder.io/t/solved-the-query-loop-in-the-component-is-not-working-as-expected/28920/12 "2025-01-27T15:14:31Z")

</div>

Hi Matej,

Interesting🤔 Please watch the video below. I completely removed the old components from the beginning as Thomas said and rebuilt them.

> **[product loop.mp4](https://drive.google.com/file/d/1Fgtr8_ssVPSVtOn1roQFlfoEDCFlpDCs/view?usp=sharing)**
>
> Google Drive file.

**Component file**

> **[bricks-component-qkznaq-product-loop.json](https://drive.google.com/file/d/1APa3imCV69NcFepX7egSqcGOtw3_AX5n/view?usp=sharing)**
>
> Google Drive file.

---

<div class="post-metadata">

**Author:** ![Matej](https://forum.bricksbuilder.io/user_avatar/forum.bricksbuilder.io/matej/32/20184_2.png) [@Matej](https://forum.bricksbuilder.io/u/Matej)\
**Post date:** [January 28, 2025, 3:26pm UTC](https://forum.bricksbuilder.io/t/solved-the-query-loop-in-the-component-is-not-working-as-expected/28920/13 "2025-01-28T15:26:39Z")

</div>

Hi @HOSEIN,

thank you very much for the video and the component. I was able to replicate it, and I’ve added it to the bug tracker about this. It’s interesting though that for the image, I see one random image in my local install - no idea where it comes from.

Best regards,  
Matej

---

<div class="post-metadata">

**Author:** ![HOSEIN](https://forum.bricksbuilder.io/user_avatar/forum.bricksbuilder.io/hosein/32/25907_2.png) [@HOSEIN](https://forum.bricksbuilder.io/u/HOSEIN)\
**Post date:** [January 28, 2025, 3:40pm UTC](https://forum.bricksbuilder.io/t/solved-the-query-loop-in-the-component-is-not-working-as-expected/28920/14 "2025-01-28T15:40:59Z")

</div>

Nice, thank you Matej🔥

---

<div class="post-metadata">

**Author:** ![HOSEIN](https://forum.bricksbuilder.io/user_avatar/forum.bricksbuilder.io/hosein/32/25907_2.png) [@HOSEIN](https://forum.bricksbuilder.io/u/HOSEIN)\
**Post date:** [February 28, 2025, 8:08am UTC](https://forum.bricksbuilder.io/t/solved-the-query-loop-in-the-component-is-not-working-as-expected/28920/15 "2025-02-28T08:08:57Z")

</div>

Hi again Matej,

It seems that the second issue has been fixed in the new version. The first issue was already fixed. Right?

---

<div class="post-metadata">

**Author:** ![HOSEIN](https://forum.bricksbuilder.io/user_avatar/forum.bricksbuilder.io/hosein/32/25907_2.png) [@HOSEIN](https://forum.bricksbuilder.io/u/HOSEIN)\
**Post date:** [April 30, 2025, 10:12pm UTC](https://forum.bricksbuilder.io/t/solved-the-query-loop-in-the-component-is-not-working-as-expected/28920/16 "2025-04-30T22:12:46Z")

</div>

Hi again @Matej,

To be sure and to remind you, this report has 2 items.

The first one is related to the rendering of the first item of the Products Query component in the builder, which still happens (in 2.0 alpha).

The second issue was for the query loop to reset after importing the component, which has been fixed in version 1.12. Do you confirm the first case is still happening?

Thank you

---

<div class="post-metadata">

**Author:** ![Matej](https://forum.bricksbuilder.io/user_avatar/forum.bricksbuilder.io/matej/32/20184_2.png) [@Matej](https://forum.bricksbuilder.io/u/Matej)\
**Post date:** [May 7, 2025, 3:50pm UTC](https://forum.bricksbuilder.io/t/solved-the-query-loop-in-the-component-is-not-working-as-expected/28920/17 "2025-05-07T15:50:48Z")

</div>

Hi @HOSEIN,

sorry I overlooked your answer, I was on holidays. You are right, the first one is still happening, I think you also have [one similar report](https://forum.bricksbuilder.io/t/wip-the-query-loop-in-the-component-displays-posts-in-addition-to-products/30627) opened, right? It’s still in WIP, and it’s still happening in 2.0 alpha.

The second one should be solved 😉

Best regards,  
Matej

---

<div class="post-metadata">

**Author:** ![HOSEIN](https://forum.bricksbuilder.io/user_avatar/forum.bricksbuilder.io/hosein/32/25907_2.png) [@HOSEIN](https://forum.bricksbuilder.io/u/HOSEIN)\
**Post date:** [May 7, 2025, 5:18pm UTC](https://forum.bricksbuilder.io/t/solved-the-query-loop-in-the-component-is-not-working-as-expected/28920/18 "2025-05-07T17:18:39Z")

</div>

Hi @Matej,

Yes, that’s right. Thank you very much.

---

<div class="post-metadata">

**Author:** ![timmse](https://forum.bricksbuilder.io/user_avatar/forum.bricksbuilder.io/timmse/32/1192_2.png) [@timmse](https://forum.bricksbuilder.io/u/timmse)\
**Post date:** [June 17, 2025, 10:19am UTC](https://forum.bricksbuilder.io/t/solved-the-query-loop-in-the-component-is-not-working-as-expected/28920/19 "2025-06-17T10:19:26Z")

</div>

Hi Hosein,

We fixed this issue in Bricks 2.0 RC, which is now available in your account.  
Changelog: [Bricks 2.0-rc Changelog – Bricks](https://bricksbuilder.io/release/bricks-2-0-rc/)

Please let us know if you are still experiencing issues.

**As with any pre-stable release, please do not use it on a production/live website. It is only meant for testing in a local or staging environment.**
