NO BUG: ACF Repeater Issue in Bricks Builder: Incorrect Colors Displayed on Product Archive Page

Browser: Chrome 110
OS: macOS / Windows / Linux / etc.
URL: https://staging.mediterraneanpoppy.com/
Video: Jam

I have an ACF repeater linked to my WooCommerce products. This ACF repeater includes two fields: a color picker and a page relationship type field. When Iā€™m on the product template, Iā€™ve created a query loop that correctly displays the ACF repeater.

The issue arises when I want to display this ACF repeater on the product archive page. There, Iā€™ve created a query loop to show the products, and within that loop, I tried to create another one to display the ACF repeater corresponding to each product.

It works to read how many rows the repeater has for each product. However, when it comes to displaying them, the way it shows the repeater doesnā€™t work properly. In the color picker field, it chooses a color that is not corresponding to the repeater of each product. Instead, it seems to read the colors of the first product in the archive and reproduces those same colors across all products.

What might I be doing wrong?

PS: Im using Bricks 1.9.8 beta

Hi Luis,
Thanks so much for your report!

The problem arises because every ā€œcolor fieldā€ uses the same selectors, e.g.
.brxe-wliesx .brxe-vlbfhc.brxe-block[data-query-loop-index="1"].

You can avoid this problem by using a style tag instead so that the colors are output dynamically/individually. Remove the repeater background-color and the border from the repeater element, and add two attributes under style Ā» attributes instead (one for the border, one for the background color):

Name: style
Value: background-color: {yourColorField}

Then it should work :v:

1 Like

It works! Thank you!

1 Like