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.

Blog post sorting breaks in 1.7.0, in some situations

November 01, 2010 2:43pm

Subscribe [7]
  • #1 / Nov 01, 2010 2:43pm

    Adam Engst

    12 posts

    After updating from 1.6.8 to 1.7.0, one aspect of our site - short blog posts about particular ebooks - stopped sorting properly.

    If you look at the Blog tab on this page, for instance,

    http://www.takecontrolbooks.com/mobileme

    you’ll notice that the posts are in no particular order. That wasn’t true before and shouldn’t be now. The code hasn’t changed from when it worked fine - here’s the relevant line:

    {reverse_related_entries weblog="news" status="open|Homepage|Not CFU" orderby="entry_date" sort="desc"}

    I’ve played with making orderby look at title instead of entry_date, but that makes no difference.

    What’s really weird is that there’s another part of the site (it’s private, so I can’t show it off here) where the sorting still works fine; the orderby and sort options are the same.

    {reverse_related_entries weblog="news" status="not closed|Not CFU" orderby="entry_date" sort="desc"}

    Any ideas about what’s going on here, and why upgrading to 1.7.0 broke this functionality?

    cheers… -Adam

  • #2 / Nov 02, 2010 4:23am

    John Henry Donovan

    12339 posts

    Adam,

    As you are using related entries, give your cache a good clear first to rule that out.

    Control Panel Location: Admin > Utilities > Clear Cached Data Files

  • #3 / Nov 02, 2010 10:18am

    Adam Engst

    12 posts

    Alas, clearing the cached data made no difference.

    cheers… -Adam

  • #4 / Nov 03, 2010 3:25am

    John Henry Donovan

    12339 posts

    Adam,

    I believe you have the value for orderby= wrong

    The correct value is date not entry_date

    {reverse_related_entries weblog="news" status="open|Homepage|Not CFU" orderby="date" sort="desc"}

    Can you try that and let us know if it works for you then. Give the cache a clear if ti doesn’t work first time.

  • #5 / Nov 09, 2010 7:28pm

    Adam Engst

    12 posts

    Ach, sorry for missing this - the system didn’t alert me to your response.

    Changing entry_date to date made no difference, neither to the code that’s not working nor to the code that is working with the exact same syntax. Cache clearing didn’t help either.

    cheers… -Adam

  • #6 / Nov 10, 2010 9:55am

    Sue Crocker

    26054 posts

    Did you try manually deleting the cache via FTP?

  • #7 / Nov 10, 2010 10:02am

    Adam Engst

    12 posts

    When I look in my tbsystem/cache folder, I see a bunch of other folders and an index.html file:

    eecore/tbsystem/cache/db_cache/
    eecore/tbsystem/cache/index.html
    eecore/tbsystem/cache/magpie_cache/
    eecore/tbsystem/cache/page_cache/
    eecore/tbsystem/cache/sql_cache/
    eecore/tbsystem/cache/tag_cache/

    Is it OK to just trash these while everything is running?

    cheers… -Adam

  • #8 / Nov 10, 2010 4:54pm

    Ingmar

    29245 posts

    Yes, EE will rebuild any files as needed.

  • #9 / Nov 10, 2010 5:03pm

    Adam Engst

    12 posts

    OK, I’ve deleted everything in the /cache folder from the command line, and EE has started to rebuild those things. However, it has made no difference to the random sorting of posts in the Blog tab on this example page.

    http://www.takecontrolbooks.com/mobileme

    If it helps, here’s the entire block of code that’s involved.

    cheers… -Adam

    
    									
  • #10 / Nov 11, 2010 1:43pm

    Sue Crocker

    26054 posts

    If you create a brand new template with an exp:weblog:entries loop in it with the entry_date being echoed out, does it work as expected?

  • #11 / Nov 11, 2010 3:43pm

    Adam Engst

    12 posts

    Honestly, not being a developer, I haven’t the foggiest idea how to do this in such a way that it works. I can create a template and paste some code cribbed from another page in, but it’s entirely random and isn’t working. My dev capabilities are limited to modifying existing code.

  • #12 / Nov 11, 2010 8:48pm

    Brandon Jones

    5500 posts

    Hi Adam,

    Sue’s just suggesting taking the original template and striping it down to the bare minimum, then adding {entry_date} to the reverse_related_entries section (if it’s not in there already) to see if entries output in the correct order. Make sense?

    Also, if you’re using extensions, try temporarily disabling them to see if that makes any difference.

  • #13 / Nov 12, 2010 3:28pm

    Adam Khan

    319 posts

    Different Adam, same site. Disabled all extensions, flushed all caches, same problem.

  • #14 / Nov 13, 2010 5:19pm

    Greg Salt

    3988 posts

    Hi Adam Khan,

    Yours is a site that was upgraded from an earlier version to 1.7.0 as well? The orderby was working correctly before the upgrade?

    Cheers

    Greg

  • #15 / Nov 24, 2010 6:57pm

    Adam Engst

    12 posts

    Yes, the orderby was working properly before we upgraded from 1.6.8 to 1.7.0, and it continues to work correctly in other parts of the site that use exactly the same code.

    Adam Khan is our developer, and he’s not seeing a solution either.

    cheers… -Adam

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

ExpressionEngine News!

#eecms, #events, #releases