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.

Relationship bug with orderby="random"

June 26, 2013 6:57pm

Subscribe [1]
  • #1 / Jun 26, 2013 6:57pm

    kellysims

    123 posts

    I’m having a weird issue where I’m outputting some related entries using the parents tag. I have 4 entries that are supposed to show, but when I set the order to random, sometimes 3 show and sometimes 4 show. We did some kicking around and noticed that it’s also trying to pull entries from an entirely different channel than I’ve set.

    Example:

    {exp:channel:entries channel="products" limit="1" disable="categories|category_fields|trackbacks|member_data|pagination"}
    
           {parents channel="buzz" limit="4" orderby="random"}
           <h4>{parents:title}</h4>
    <p>      </p><blockquote><p>{parents:cf_buzz_quote}</p>
    </blockquote>
    <p>       {parents:cf_buzz_author}<br />
           {/parents}</p>
    
    <p>{/exp:channel:entries}

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

ExpressionEngine News!

#eecms, #events, #releases