1

I have a relationship field in a page with the name pro_related_program. Before the update from 2.5.5 to 2.7.3 this code snippet (as part of a larger template that loads a single channel entry):

{related_entries id="pro_related_program"}
 <div id="midLeftInset">            
<p>This session is part of a larger series.  For more information see <a href="{title_permalink="programs/catalogue"}" title="TDLC: {title}">{title}</a></p>
</div>{/related_entries}

would result in this html for a specific page on my website:

<div id="midLeftInset">            
<p>This session is part of a larger series.  For more information see <a href="https://www.jointokyo.org/en/programs/catalogue/DRM2011" title="TDLC: Disaster Risk Management in East Asia and the Pacific - 2011 Series">Disaster Risk Management in East Asia and the Pacific - 2011 Series</a></p>
</div>

the upgrade modified the code template snippet to:

{pro_related_program}
 <div id="midLeftInset">            
<p>This session is part of a larger series.  For more information see <a href="{pro_related_program:title_permalink="programs/catalogue"}" title="TDLC: {pro_related_program:title}">{pro_related_program:title}</a></p>
</div>{/pro_related_program}

which gives me back nothing. If I add a no_results clause in there it gives me the contents of the no_results clause.

Does anyone have any ideas as to what might be causing this? What I coulddo to debug it?

1
  • 1
    Does the child entry have a status other than "open"? A future entry date? An expiration date in the past? All these would require further parameters to be set on the pro_related_program tag, much like a channel:entries loop. Apr 28 '14 at 11:45
1

As Derek Hogue has suggested and from my own experience, I think this is likely an issue of a missed status parameter in the relationship tag pair. Also it also bears mentioning that the status parameter in relationship tag pairs at least up until the current EE version of 2.8.1 is case sensitive, which is different from the channel:entries status parameter behavior which is not case sensitive.

To test this, you could try something like:

{exp:channel:entries channel="your_channel" status="not closed"}

{pro_related_program status="not closed"}
{pro_related_program:title}
{/pro_related_program}

{/exp:channel:entries}
1
  • The status thing was it. Thanks very much for your help!
    – UltraBob
    Apr 28 '14 at 14:39
0

I just ran into this issue and I've discovered a strange behavior. Having the relationship fields without the wrapping is working.

This seemingly proper code provides nothing:

{brief channel="projects" status="Open|Closed"} 
    {brief:title}
    {brief:entry_id}
{/brief} 

While this one without the wrapping tag pair gives me what I need:

{brief:title}
{brief:entry_id}

Was this a bug?

1
  • try status="open|closed" instead of status="Open|Closed"
    – UltraBob
    Sep 17 '15 at 0:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.