About the author

Steven HarmanSteven Harman is a passionate developer who believes that writing great software isn't just a job, its a craft.

ASP.NET MVP

For recent posts and more about me, scroll to the bottom.

Subscribe

  • Subscribe to my feed. via RSS
  • Subscribe via email via email

Jobs

Badges

  • Subtext Project
  • Support Subtext
  • HiddenNetwork.com Banner

WTF - My Posts are Shown In the Wrong Order?

UPDATE: All is well... I was able to fix the issue with a simple SQL Statement per Haacked's tip.

Whoa, Whoa, Whoa... What is going on? I was just doing a little administrative admin to a few posts on my blog - namely adding them to a new subText Category and I just noticed that my homepage is showing some posts in the wrong order. And the posts seem to be from random dates. Quick, take a look at the top few posts on my homepage... notice anything. They go from Top to Bottom in this order:

  • Beer May Help Prevent Cancer... - June 13, 2006
  • The New Buckeye State Brew... - April 04, 2006
  • Columbus Snow Flakes ... - Dec 23, 2004
  • Ass(orted) Flavors! - Dec 29, 2004
  • I was Click-Happy... doh! - May 25, 2006

Those middle three (3) are totally out of order, and then a couple recent posts show up in the correct order, and then some more out-of-order posts. I don't know what the hell is going on here. I'm at work right now so I can't debug anything, but I did just upgrade to the latest version of subText (version 1.5.1) this morning. It seemed to be just fine for a long time tho... now all of the sudden it's all screwed up. Anyone seen similar behavior?

What others are saying.

# re: WTF - My Posts are Shown In the Wrong Order?
Gravatar Haacked
Jun 14, 2006
Check the DateSyndicated column in the database. They are ordered by that date. Have you unpublished and republished any posts?

You can run an update like so to re-order them:

UPDATE subtext_Content SET DateSyndicated = DateCreated

Phil
# re: WTF - My Posts are Shown In the Wrong Order?
Gravatar Steve Harman
Jun 14, 2006
Phil,
Thanks for the tip... I'll be sure to give it a try when I get home.

I was in the middle up updating a couple of posts (3 to be exact) and adding them to a new Category I had created. But I don't see how that should have any impact on the posts that were suddenly being shown out of order.

At any rate, I'll let you know what my investigation turns up.

Thanks again!
# re: WTF - My Posts are Shown In the Wrong Order?
Gravatar Steve Harman
Jun 14, 2006
Phil,
Your SQL worked almost perfectly... just one small change was needed. There is no DateCreated column in the table, but rather a DateAdded column. Anyhow, I ended up tweaking the SQL statement just a bit:
UPDATE subtext_Content SET DateSyndicated = DateAdded WHERE PostType = 1 AND BlogId = xxx;
That way I only changed Posts (and not comments, track/ping backs, etc...) and only for the individual blog I was interested in (the xxx is the individual BlogId).

Thanks again for the tip!
Comments have been closed on this topic.