My name is Rob Cherny and I'm a professional Web Developer with 16 years of experience creating Web sites and Web-based applications. This site is where I write about my work, and random other things...

Learn More


Close Tab

Web Development

Upgrading to Textpattern 4.0.4, Comment Spam, and So Forth

So this morning I successfully upgraded the site to Textpattern 4.0.4, which seems great so far. There’s a number of improvements in this release. There is an important security fix, for one, but a lot of other conveniences too, including the 2.0 release of Texttile, which is looking nice… There’s a variety of new tags and tag attributes which I haven’t even begun to plow through, but some of which look interesting, like some new link and link category tags. The Textpattern guys set up a FAQ page which can help guide you through some of the trickier parts of the new release, and there’s also a post which points out some of the “hidden” new things in there.

Definitely a Recommended Upgrade

I’d definitely recommend the upgrade though, if for no other reason that the UI improvements in the administrator. Seriously, one of the biggest issues I had with the admin side of Textpattern has been the choppy CSS set up of the pages, so much so that I’ve repeatedly considered hacking the files to get it to lay things out better. For one, showing “Recent Articles” on the “Write” tab no longer shifts the page around, and more options are collapsed to be clicked-to-show, generally making for a cleaner UI. Also, the comments and articles main screens are just laid out much easier to read now.

These changes alone make the upgrade worth it to me, honestly.

Textpattern 4.0.4 Comment Form Changes

For the most part, my upgrade went fine, except for in one area, the way the comments system works included some interesting changes. For my part, I don’t recall doing any serious customization to the comments system when I set the site up, and they said the changes wouldn’t be too significant if your set up resembled the out of the box set up. Of course, the upgrade didn’t go too smoothly for me… In the preferences I have my comments set to be output in an ordered list (numbers suppressed in the CSS), which is one of the default options.

The first thing that happened was the preview, which on my previous install was inserted automatically at the top of the comments ordered list on the article page, didn’t get output in that list any longer, so the CSS styles I’d set up off the ol.comments classes didn’t work for the preview. This is because the comments preview is now output automatically as part of the comment_form form.

What I ended up having to do was add a new txp:if_comments_preview block at the top of the comment_form form, which is now auto outputting the comments preview as part of that form, in a second ol.comments list. Of course, then the preview shows up twice — so I had to then, in the comments_display form, include a show_preview=“0”, to suppress the built in output.

Not a big deal, but it left me scratching my head for a while, and while I don’t recall changing the comments setup much when setting up the site, it’s possible I did and just don’t remember — it’s not something I think about a lot.

My Customizations

This last part is really just for my own benefit. I always seem to forget what I’ve done, so I’m putting it here for reference…

First, I always seem to forget I’m using a hacked version of the asy_category_tags custom tag, which includes a partial function from the cbs_category_list function, so my article form references a plugin which isn’t listed (I didn’t change the function call name in the source, for whatever reason).

I also finally switched out the generic links list on the home page with the features offered from the tfu_linklog custom tag, which now allows me to stick some dates over there, which I’ve been wanting to do for a while now — small thing but it made me happy. I’ve been sitting on the more advanced features like searching the links section for a while now, I’m hoping to get there soon, but who knows.

Comment Spam

Lastly, just a small rant. I just don’t get it. Someone from, I think, based on the IP’s, Amsterdam, has been hitting me with comment spam on a daily basis now for a week or two. I just don’t get it, especially because I ended up having to set comments to be moderated, so it’s not even like they’re showing up on the site. Learned that the first day it happened, and haven’t looked back.

Kinda sucks that a few jerks need to ruin everyone’s fun. And in this case, the links aren’t even showing up. I just don’t get it.

Nov 5, 02:48 AM in Web Development (filed under Textpattern, ChernyCom)

commenting closed for this article

In This Section