ordering of files retrieved from /content #7
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: paintedsky/dead-simple-blog#7
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hi,
I am using a modified older version. It always pulled the posts out in the right order before my site moved server. Now the posts come out in a consistent but not newest descending order. Do you have any idea why the directoryIterator loop would change the order of the files retrieved? I am using YYYY-MM-DD
Hey, sorry for the late reply! I read the email notification and then completely forgot about it, until I had occasion to look at the repo again today (hashtag adhd).
It definitely sounds like there's some weird difference between your old server and new server, but diagnosing what that difference is might be annoying.
Since you said you're on a modified older version, perhaps you could just modify it a bit more to add part of the latest update, the bit that manually sorts posts to avoid these sorts of issues?
There's only two little bits of code you'd need to add:
sortPosts
function on lines 17-21sortPosts
functionWould that be a workable solution for you?