Over the weekend, I noticed that several of my older blog posts weren't showing up when I searched for them on my site. After a little more digging, I found that several hundred seemed to be missing. I couldn't get to them via a search, by date, or even by their UUID directly in the URL. I checked the database tables, and sure enough they were there.
After a little more digging, it turns out the problem has to do with having upgraded from blogCFC 3.x to 4.x to 5.x. Along the upgrade path, changes there were several additions to the blogCFC database, as well as the core CFC code. One of those changes introduced a new field in the tblBlogEntries table called username. The username is supposed to contain the username of the person making the blog entry. In my case, all "new" blog entries from blog CFC 4.x on had a value in this field. Older entries, from the blogCFC 3.x days didn't. Instead, they were NULL. This caused the main method in blogCFC.cfc to return no results for entries with NULL for the username. You can see why in the WHERE clause for the getEntry method:
and tblblogentries.blog = <cfqueryparam value="#instance.name#" cfsqltype="CF_SQL_VARCHAR" maxlength="50">
and tblblogentries.username = tblusers.username
Once I made an entry in the username column for all of my "legacy" entries, all of the posts started showing up as expected.

