More gardening
9:17pm, 12th June 2007
I am enamoured of the idea that gardening is the secret to happiness, provided you adopt a wide enough definition of gardening. Maintaining a website falls within that general area, and it does indeed give me satisfaction to trim back bugs here, polish an old water feature there, and mow the comments occasionally.
So I decided to finally migrate all the old blog posts to Wordpress. You can see the fruit of this labour displayed beautifully on the sidebar of the main page! Everything is now under one tidy roof, after some massaging.
Wordpress demands globally unique post slugs. I dislike this being a requirement (how many URLs use the post slug as their only component? Can the disambiguation not be done on a more local scale?), and it presented a problem transitioning URIs like
http://james.lab6.com/2005/02/21/gattaca
and
http://james.lab6.com/2004/10/20/gattaca
to the Wordpress database. It wants to retitle the second one http://james.lab6.com/2004/10/20/gattaca-2/, which is shocking to someone who cherishes permanent URIs, but redirecting the old to the new one with an HTTP 301 status code should be philosophically acceptable. That means .htaccess to the rescue again:
RedirectMatch 301 ^/2004/10/20/gattaca(/)?$ http://james.lab6.com/2004/10/20/gattaca-2/
That’s in /2004/.htaccess rather than /.htaccess so that this unfortunate patching-up is filed away safely in 2004 and I don’t have to deal with it again. Apache kindly traverses all directories above the requested URI looking for .htaccess files.
The other problem is that all comments before Phase II have their timestamps offset by -0500. In some cases, comments appear to be made before the post. It’s on the todo list for another day.
Finally, I am the proud owner of Ticket 4360 on the Wordpress Trac. I’d like commentators to choose a name for themselves, but the email field is mostly worthless. I could have just just disabled it (as I did) and moved on, but it seemed a sensible enough feature to request for the populace at large. I’m too kind. Amazingly enough, the “bug” was actually noticed by a developer! There’s a patch attached to that ticket, and it awaits testing. Good work, Wordpress guys.
Oh, and Firebug is really, really useful for debugging and tweaking CSS from within Firefox.
