I have a query loop which pulls in the value of an ACF relationship field (“associated region”) into each card in the grid. Up to v.1.7 it worked fine, and the field value would appear on each card (the value in parentheses):
Not confirming anything but this looks similar to other ACF relationship field reported behaviors. Search the bug topic - fairly certain its a WIP. Good report though!
The weird thing is I DID search for other reports of something like this. Even just using the term “relationship” only finds posts from last November (one of which is mine!)
Unfortunately, I cannot reproduce the issue. Can you please test it again with Bricks 1.7.2, which will be released soon? If it still doesn’t work, please send us access data and a link to this thread to help@bricksbuilder.io.
There are currently no other reports on the topic of “ACF Relationship”.
OK, I’ll try when 1.7.2 is out. However note that your forum search function is not working. Searching for keyword “relationship” does not find the post @FranklyCo mentioned, NO BUG: ACF Relationship
In the quick search, the posts are displayed according to relevance (default). The post mentioned has no relevance because its content only consists of the error message.
However, you can always search in more detail if you want, or even sort by date. Then you will see the most recent posts first, as in my screenshot.
This is the exact opposite of intuitive—I mean could one expect to put a query loop inside another query loop for extracting a single value (i.e. no looping!)? In any event, it does work. But the old method (up to 1.7.0) was far easier and more intuitive.
My apologies, yes you are right, you should be able to use {acf_associated_region} directly to retrieve the data directly. I am able to do that locally without issue in the latest 1.7.2 version.
If the Return Format of the relationship field is Post Object, it should render the post’s title wrapped into a link.
If Return Format is Post ID, it should render the post’s ID directly.
Let me check your staging site again and it could be some other issues causing your website not working.
There is a bug in Bricks that misread the incorrect field settings if the same field name exists in ACF.
I have recorded this into the bug tracker.
For the time being, you could still use it as long as both Return formats are the same.
If there is no specific reason to restrict the return format as ID or Post Object inside both Field groups, I would suggest setting it as Post Object (default) for both.
So does this mean that as long as both fields are set to return “Post Object” I can then return to looking up the data without a needing query loop inside the main query loop?