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.

Sorting by date returning odd results

March 14, 2013 10:52am

Subscribe [2]
  • #1 / Mar 14, 2013 10:52am

    kelseyads2

    98 posts

    I am having an issue sorting by the EE date field. I have a channel “news” that has a few custom fields. I had a custom date field but realized sorting by that was erratic at best, so I deleted it and we edited the EE date field on all the entries.

    Now here’s the weird part, how that I am sorting by the EE date field, it shows about half the entries sorted by date, then starts over with the other half.

    Here is my channel entries tag:

    {exp:channel:entries channel="news" orderby="entry_date" sort="desc" limit="100" show_expired='yes' dynamic="yes" }
    <div class="areaattractions_content">
     <h3><a href="http://{title_permalink=">{title}</a></h3>
    <p> {entry_date format="%F %d %Y"}<br />
     {news_teaser}<br />
    </div><br />
    {/exp:channel:entries}

    Note: I have tried “date” and “entry_date” in the exp:channel:entries tag and both produce the exact same results.

    Below is the output of the query above:

    [removed link url after resolved]

    Check out the dates as you scroll… weird!

    Anyone seen this before? Is it a bug? I have completely cleared the EE caches in the last day or two, so that doesn’t appear to be the issue. I’m at a loss as to what I can try.

    Thoughts? Suggestions?

  • #2 / Mar 15, 2013 1:41am

    Bhashkar Yadav

    727 posts

    Hi Brandon,

    Instead of using the parameter orderby=“entry_date” use orderby=“date”. Take a reference from here http://ellislab.com/expressionengine/user-guide/modules/channel/channel_entries.html#orderby


    Best Regards,

  • #3 / Mar 15, 2013 8:23am

    kelseyads2

    98 posts

    Hi Brandon,

    Instead of using the parameter orderby=“entry_date” use orderby=“date”. Take a reference from here http://ellislab.com/expressionengine/user-guide/modules/channel/channel_entries.html#orderby


    Best Regards,

    Thanks for the suggestion, but as I mentioned above I have tried the EE query using both “date” and “entry_date” and both return the exact same thing.

  • #4 / Mar 15, 2013 8:51am

    Bhashkar Yadav

    727 posts

    Hi Brandon,

    Sorry I didn’t notice your note as mentioned within the first thread.

    Could you check if “Make Entry Sticky” is checked for the entries.

  • #5 / Mar 15, 2013 10:12am

    kelseyads2

    98 posts

    I thought I had checked that before but that was it… they marked a bunch (almost half) of the entries as sticky. Glad to know it’s not a bug, at least. Thanks!

  • #6 / Mar 15, 2013 2:17pm

    Bhashkar Yadav

    727 posts

    Glad to hear it 😊 .

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

ExpressionEngine News!

#eecms, #events, #releases