Need someone to lead product management at your software company? I build high-craft software and the teams that build it. I'm looking for my next opportunity. Check out my resume and get in touch.

This is the blog of Adam Kalsey. Unusual depth and complexity. Rich, full body with a hint of nutty earthiness.

Content Management

Recent Comments bug fix

Freshness Warning
This blog post is over 22 years old. It's possible that the information you read below isn't current and the links no longer work.

If you’re using MT’s Recently Commented On feature and you notice that some entries don’t appear there that should, I may have a solution for you. Over at the MT support forums we discovered that at least two of the people experiencing this problem were using MySQL 3.23.45 as their database. Users of later versions of MySQL weren’t having the problem, so it appeared to be a MySQL problem.

A little troubleshooting revealed the culprit. MT uses a temporary table to gather the list of recent comments and that table wasn’t being sorted correctly by MySQL. It took some serious trial and error to figure out how to make it work correctly.

The fix requires that the records be inserted into the temporary table in the order you will want to retrieve them. So a simple ORDER BY statement in the table creation SQL was needed.

To fix the problem, you’ll need to make the following changes. This assumes you are running MT 2.21. Other versions might have different line numbers and code.

Go to <mt>/lib/MT/ObjectDriver/DBI and open mysql.pm. (Replace <mt> with wherever your copy of Movable Type can be found.)

Line 116 reads my $dir = $j_args->{direction} eq 'descend' ? 'desc' : 'asc';. Move it to before line 97, which reads my $ct_sql = "create temporary table tempTable\nselect ";.

Now go down to line 106 where it says $ct_sql .= "where " . join ' and ', @$ct_terms if @$ct_terms;. Right after that line, add a line that reads $ct_sql .= "ORDER BY ${j_tbl}_$j_args->{'sort'} $dir";

That’s it. Upload your newly changed script and rebuild your templates. The usual disclaimer applies. It works for me, it might not work for you. Back everything up before you start and don’t blame me if your computer begins speaking in tongues or emits a foul odor.

Recently Written

Think Systems, not Symptoms
Dec 15: Piecemeal process creation frustrates teams and slows work. Stop patching problems and start solving systems. Adopting a systems thinking approach helps you design processes that are efficient, aligned with goals, and truly add value.
Your Policies Aren’t Your Culture
Dec 13: Policies guide behavior, but culture is the lived norms and values of your team. Policies reflect culture -- they don’t define it. Netflix’s parental leave shift didn’t change its culture of freedom and responsibility. It clarified how to live it.
Lighten Your Process Burden
Dec 7: Everyone hates oppressive processes, but somehow we keep managing to create them.
Product Add-Ons Are An Expansion Myth
Dec 1: Add-ons can enhance your product’s appeal but won’t drive significant market growth. To expand your customer base, focus on developing standalone products.
Protecting your Product Soul when the Same Product meets New People.
Nov 23: Expand into new markets while preserving your product’s core value. Discover how to adapt and grow without losing your product’s soul.
Building the Next Big Thing: A Framework for Your Second Product
Nov 19: You need a first product sooner than you think. Here's a framework for helping you identify a winner.
A Framework for Scaling product teams
Oct 9: The people, processes, and systems that make up a product organization change radically as you go through the stages of a company. This framework will guide that scaling.
My Networked Webcam Setup
Sep 25: A writeup of my network-powered conference call camera setup.

Older...

What I'm Reading