Jump to content

2.6.16 publish date: Not yet in sort selector?


thomas
 Share

Recommended Posts

Hello,

my client wants to schedule his posts and since I haven't had any issues with 2.6.16 in development I decided to update his site to the dev version in order to use "publish" date. The DB was properly updated, "published" shows up in the pages table, I can use $page->published but $pages->find("sort=-published") doesn't seem to work. Is this correct or am I missing something?

Thanks,

thomas

Link to comment
Share on other sites

Haven't looked into the implementation yet but you are right; it seems not to be working. However, sorting the PageArray itself works for me, i.e.

$pages->find('template=basic-page')->sort('-published');

Not exactly what you are after, but just thought to point that out...

Edited by kongondo
Clarified post
Link to comment
Share on other sites

Look at my code...that's an in-memory sort (i.e. the sort is happening outside the database, after the items have already been fetched). In other words, and I should have been clearer, sort within the selector is not working for me either, just as you described  :-)

Link to comment
Share on other sites

  • 1 year later...
7 minutes ago, Neo said:

now

Sorting by published works for the last two years or so. (Not sure about before that or about PW 2.6 though)

$pages->find('template=MyTemplate, limit=15, sort=-published') 

most certainly works.

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...