Hello, Iβm using Bricks 2 + Meta Box.
I have a custom post type that contains a set of custom fields.
Inside these custom fields, there is a clonable group that contains:
- Text β the name of a dropdown
- File Advanced β a list of files that should be shown in the dropdown
Each post has 2 items in this group, and each item has 2β4 files in the File Advanced field.
I have a query loop that iterates through each post in my custom post type β this works perfectly.
Inside it, I have another query loop that iterates through the Meta Box group β this also seems to work. If I print the Text field, it shows correctly, and if I print the File Advanced field, it displays the correct list of links (<a href="...">File Name</a>, [...]).
The issue starts when I add a new loop to iterate inside the File Advanced field (i.e., over the files).
- For the first post, everything is correct: I get all items for both dropdowns.
- For the other posts, the first group item prints correctly (the first dropdown is fine), but the second dropdown prints the items from the first post (instead of its own second items list).
When I debug in PHP and print the post ID and the group iteration, I get:
post-id - iteration-index
154 - 0
154 - 1
155 - 0
156 - 0
155 - 0
156 - 0
So only the first post (154) iterates with indices 0 and 1. Posts 155 and 156 seem to iterate twice but only with index 0.
I tried various things; currently Iβm fetching the current loop object with: \Bricks\Query::get_loop_object()
When I print it, the output aligns with the loop index: itβs correct only for post 154. On posts 155 and 156, it iterates twice but always for the first group of items.
If I change the order of the group it is always the new first group that gets printed correctly.
Iβm not sure whether Iβm making a mistake or if this is a bug. Any hints would be appreciated β thanks in advance!










