ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Relationships stopped working with update from 2.7.0 to 2.7.2

October 12, 2013 8:57am

Subscribe [1]
  • #1 / Oct 12, 2013 8:57am

    tbritton

    714 posts

    I use a drop-down field to point to articles on the home page that drives a routine which makes clickable headline links for the front page articles automatically that go to the right section for each individual article.

    However, it stopped working when I performed the update from 2.7.0 to 2.7.2.

    Here is an example of the headline-link generating code that stopped getting info from the relationship field. First, the page gets the entry_id and headline_title and places those into embed variables to send over to the headline-link routines:

    <!-- Home Page Headline #1 -->
    
    {exp:channel:entries channel="home" entry_id="4262|4253|4244|5|4235" disable="categories|member_data|trackbacks|category_fields|pagination" status="open"}
    
    <h1 class="link_title">{embed="ri_embed_templates/_greater_read_more" my_entry="{entry_id}" text="{headline_title}"}  </h1>
    <div id="cs1">
    {if headline_image}{site_url}images/{headline_image}{/if}
    {photo_credit}
    </div>
    
    {headline_summary}
    
    {embed="ri_embed_templates/_greater_read_more" my_entry="{entry_id}" text=""}
    {/exp:channel:entries}

    The second embed above is for the “Read More” link, and so needs the text variable to be emptied.

    This is an example of one of the embed routines that actually inserts the headline and read more links:

    {exp:channel:entries limit="1" entry_id="{embed:my_entry}" disable="member_data|trackbacks|pagination" status="open|closed" show_future_entries="yes" show_expired="yes"}
    
    {if food_story_links}
    
    {food_story_links}
    {food_story_links:categories}
    {if category_id=="5"}
     {if embed:text !=""} <a href="http://{title_permalink=food_section/food_articles_recipes}">{embed:text}</a>{/if}
     {if embed:text ==""} [<a href="http://{title_permalink=food_section/food_articles_recipes}">Read More</a>]{/if}
    
    {/if}
    {/exp:channel:entries}

    Anyone see anything wrong in here?

    Terry

  • #2 / Oct 15, 2013 3:12pm

    tbritton

    714 posts

    Here’s a simplified breakdown of what isn’t working anymore.

    {exp:channel:entries limit="1" entry_id="{embed:my_entry}" disable="member_data|trackbacks|pagination" status="open|closed" show_future_entries="yes" show_expired="yes"}
    
    {if food_story_links}
    
    {food_story_links}
    {food_story_links:categories}
    {if category_id=="5"}
     {if embed:text !=""} <a href="http://{title_permalink=food_section/food_articles_recipes}">{embed:text}</a>{/if}
     {if embed:text ==""} [<a href="http://{title_permalink=food_section/food_articles_recipes}">Read More</a>]{/if}
    
    {/food_story_links:categories}
    {/food_story_links}
    {/if}
    {/exp:channel:entries}

    Suddenly, the first statement

    {if food_story_links}
    doesn’t populate with the related field data, or any data, for that matter, it seems. I was able to get the code to pass the if statement with
    {if food_story_links !=""}

    showing the variable is NOT empty (but the former version used to test that properly…) 

    But once through, the title_permalink fails utterly to derive the path to the article.

    All of this worked fine until I did the recent update (from 2.7.0 to 2.7.2)

  • #3 / Oct 16, 2013 5:43am

    tbritton

    714 posts

    I wonder if one of these relationship-related bugs applies to my situation?

    https://support.ellislab.com/bugs

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases