Hi! Hoping for insight.
Perhaps something changed recently that has caused my Grid fields inside of a Relationship entries not to display. I am on EEv5.3.0 and nothing has changed in my code/content to cause this issue (that I know off…). Here is a simplified snippet of my code with the issue commented:
{exp:channel:entries channel="channel_with_relationship_field"}
{relationship_field}
{relationship_field:title} // The title renders fine from the relationship entry as well as other fields...
{if relationship_field:grid_field} // ...except grid fields. Not even recognized
{relationship_field:grid_field} // Sometimes, it will find a Grid field even if the entry doesn't actually have one!
{grid_field:grid_field_label} // It's a rare thing if this gets rendered.
{/relationship_field:grid_field}
{/if}
{/relationship_field}
{/exp:channel:entries}
More info: The channel entries that is being pulled by Relationship field has 3 Grid fields. Out of 10 entries, only 3 use those Grid fields. These are the purposes of those Grid fields:
I have tried the following approaches:
I am not sure what to try now. If the functionality changed, then is there another approach to render a list of channel entries on a page that have a sub-listing of things to render? Maybe Fluid field?
Thank you in advance, -Reid
I have more information! (another piece of the puzzle).
I just experienced the same issue on a different page that is set up similarly (Page > Relationship > Grid = can’t render/find grid). The Page was working fine until I added a new field to the channel that the Relationship field points to, and added text to it. Does any of that make sense? It’s really starting to feel like a bug now. The new field that I added to the channel in the Relationship field was a TextInput and that renders fine. It’s just that now, the Grid fields that were in that channel aren’t recognized anymore.
Is there a way for me see if there are any EE errors on the page without turning it on for the whole site? I wouldn’t want to disturb the viewer’s experience.
Thanks again and I hope this is making sense to someone -Reid
rzerb - I was able to achieve writing conditionals on relationship fields called from a fluid grid parent only by using custom ee queries – and then using the declared result in a conditional. Such as:
{exp:query sql="SELECT field_id_185 as testfoo FROM exp_channel_data_field_185 WHERE entry_id = '{content:modal:entry_id}' LIMIT 0,1000"}
{if testfoo != ''}
<h2 class="button"><a href="http://{content:modal:modal-request-info-url}" class="icon-angle-right">Request Info</a></h2>
{/if}
{/exp:query}
This was not optimal, but it did the job in a pinch. I’m pretty sure there is/was a bug in 5.x.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.