WordPress 3.2 & new theme

If you are a regular, you may have noticed that I switched theme. I was using the excellent fusion theme that I found on this site, which like the theme seems to be no longer maintained. So when I upgraded to wordpress 3.2 this morning, I noticed there is a new default theme in there that I kind of like.

The best feature is support for multiple header photos. So I’ve cropped and uploaded a few photos from my collection and the site will now randomly pick one of the photos listed below. So simple, but so nice to have. Otherwise the theme is pretty basic, which I think is appropriate for a blog. Also it does microformats (which was a major annoyance with the old theme). Finally, it just looks nice and it is likely to be maintained for a while (with it shipping with wordpress and all).

Comments should be working again

I had a captcha plugin that was failing. Since I myself hate captcha’s, I’ve removed it for now and adjusted the comment settings to require moderation the first time you comment. Moderation + akismet should take care of most of the spam (hopefully). You can also still sign in using OpenId if you prefer, although the openid login on wordpress remains quite underwhelming (compared to what should be possible by now).

Anyway, happy commenting and thanks @eelkefolmer for pointing out my site was broken.

N8

I’ve had the nokia N8 for a few weeks now and since I like it, I thought I’d do a little review.

Does it have rough edges? Sadly, yes there are some. But no major show stoppers. It’s stable. The camera is awesome. The video playback is great. You can play most movies without re-encoding them. I managed to not run out of battery during a trans atlantic flight, watching movies non stop, and the oled screen is fantastic.

I’m particularly happy with how maps is improving with each version.

It went from something that barely worked a few years ago to being arguably one of the best mobile maps experiences around. It’s certainly very competitive when it comes to map quality, navigation, and offline usage.Disclaimer, I work on the backend services for this application :-).

I’ve used two ovi store applications to write this post. One is called swype and it replaces the touchscreen keyboard with a version that allows you to ‘draw’ across the keyboard and it figures out the words with great accuracy and speed.

The other is the official wordpress client, which I’m trying for the first time, and of course that’s the real reason for writing all this :-).

So far so good. I managed to write a good chunk of text with swype and the wordpress app seems to do everything I need it to do.

All together this is a pretty good phone and it is getting even better with upcoming software releases. I think the recent focus of nokia on software quality and end user experience is starting to pay off. It’s not without flaws of course and it’s definitely to early to call the battle with our competitors over but it is progress and I think we’re getting there.

A final note here. I work for Nokia and am of course slightly biased. That being said, I rarely review stuff we produce and as a rule only when I really like it, without reservations. I loved the n900, which I reviewed a few months ago, but I’ve had several nokia phones that I chose not to review as well for this reason.

WordPress automated backup

I finally sat down and wrote a little script to automatically backup my wordpress site and database. My site is hosted by pcextreme.nl, a nice Dutch startup providing hosting services that are perfect for a small site like mine. Part of the package they have is shell access via ssh, which makes this very straightforward. I use two scripts that do all the work:

dumpdb.sh:

mysqldump -u user -ppassword \
     -h host db --single-transaction \
     | gzip -9 > ~/wordpress.sql.gz

This script is stored in my home dir on the web server. The –single-transaction is needed to get rid of an error I ran into. I run it remotely using a second script backupsite.sh:

#!/bin/bash
BACKUPDIR=/Users/jilles/backup
date >> $BACKUPDIR/sitebackup.log
ssh user@host sh ~/dumpdb.sh
rsync -i -v -a --delete \
     user@host:~ $BACKUPDIR \
     >> $BACKUPDIR/sitebackup.log

This first backups the db remotely and then rsyncs everything I have on the server to a local directory. This local directory in turn is backed up by Time Machine, which provides me with nice snapshots of my site. For this to work without interaction, I have of course set up ssh authentication using my public key. I keep a little log in sitebackup.log to keep an eye on whether this all continues to work.

Anyway, nice opportunity to show of the wp-syntax plugin that I finally got around to installing in wordpress and which was actually the whole point of this blog post.

Threaded comments

Lets see if this threaded comments thing works. It seems wordpress and the fusion theme I use with it supports that now.

New theme

After saying good bye to Barthelme I actually considered sticking with the default wordpress theme for a while. Except, it’s ugly and not very nice to use either. So, after sorting by popularity, this one on the wordpress theme directory seemed nice enough. It’s called the Fusion theme and seems pleasant enough and at first glance comes with a couple of nice features. So sticking with this for a while.

I also took the opportunity of fixing the page structure (now that I have a jquery powered menu thingy).

Upgrade to wordpress 2.7.1

The joys of moving and starting a new job sadly also means less time for things like upgrading wordpress. I’ve never been so far behind the main version (one major and a subsequent minor release). So, this morning I sat down to do the usually quick and efficient switch svn to wordpress 2.7.1 tag, upload files, upgrade DB and done type ritual.

Except it didn’t work. Damn. I spent nearly two hours running into several problems and trying to fix things. The root cause was three fold.

  1. I did not RTFM.
  2. The little upgrade instructions have subtly changed. Bla bla bla, and oh BTW you should add this stuff to your wp-config.php. Naturally that was a problem.
  3. The theme I have been using for quite some time Barthelme is no longer maintained and wp 2.7.1 doesn’t seem to like it.

Basically, it didn’t like the theme and hence could not show the site. Worse, it could not show the admin site either. All it showed was a blank page. Blank as in, 0 bytes. Blank as in, oops some weird php error and lets just return 0 bytes. Not good. Somewhere in between I did actually manage to run the upgrade db script. That too didn’t have any UI but I could at least get to the upgrade link using view source in firefox. Hint, if you ever get this far, don’t do that. That didn’t make things better. I then tried removing plugin directories and theme directories to make it revert to defaults. Didn’t work, still a blank page. Then I did my usual diagnostics and found out about the wp-config settings, which by now made no difference. Still a blank page.

So, I screwed up and for the first time had to resort to actually using the db backup I thankfully made (would have been in more trouble without that). Except that didn’t work either. Yikes.  Loaded the nice little dump I had made earlier with phpadmin and uploaded. After some time it came back with a nice “Got a packet bigger than ‘max_allowed_packet'” error. Yikes. This one took a while to figure out. Apparently this is some setting you can override if you have the right to do so, which I don’t. Most advice out there points this out “hey just fix my.cnf, restart the server and you’re good”. Yeah right, not much help but thanks. So then I figured out that line length probably was the problem here. Indeed it was since phpadmin seems to default to generating one huge INSERT statement with a comma separated list of all the values. So everything I published since 2005 on this blog on one line and , separated. Sounds like a lot but it’s only 1.5MB or so.

Anyway, the solution is buried in a comment from Gareth in the mysql documentation: http://mysql.telepac.pt/doc/refman/5.1/en/packet-too-large.html

So just search and replace ), by ); INSERT INTO `wp_posts` VALUES. Be careful about doing that only on the insert you want to change BTW.

Anyway, I reverted back to wordpress 2.6.5, imported my fixed dump, fixed my configuration to be prepared to 2.7.1 and checked if my blog survived. It did.

Then I switched the theme to the default theme (i.e. what you are looking at), did the svn switch, upload, upgrade db and this time everything worked.

So, you will have to excuse the odd layout problems for now. Default wordpress theme sucks and I suspect I have some overflow issues here and there. I will be fixing those shortly of course.

Vacation photos

I’ve uploaded the photos from my recent vacation in Spain. Earlier, I posted an overview of the places I’ve visited so I won’t repeat that here. I took quite a bit of photos and filled both 1GB SD cards I have.

Of course, I took lots of nice panorama photos as well. The latter have also been added to my special stitched photo album where you can admire them in slightly higher resolution. Too bad I don’t have the bandwidth + space to put them up in full resolution. For example the one below is originally 18319×2191 pixels wide and composed of no less than 11 8 megapixel photos and the jpeg is 40 MB. The level of detail is amazing. WordPress is sadly messing up the aspect ratio but if you click on it you should see it properly.

WP-OpenID

I’ve been enthusiastic about openid for a while but have so far not managed to openid enable my site. WP-OpenID, which is the main openid plugin for wordpress is under quite active development. Unfortunately, until recently, any version I tried of that had some issues that prevented me from using it.

The author Will Norris got hired by Vidoop the other day to continue working on wp-openid in the context of the diso project. Diso is another thing I’m pretty enthousiastic about. So, things are improving on the openid front.

Tonight, I managed to get version 2.1.9 of wp-openid to install without any issues on my wordpress 2.5.1 blog. I’ve been testing and it seems to at least accept my openid www.jillesvangurp.com (delegate to myopenid) without issues.

So finally, my blog is openid enabled.

The delegation bit is BTW courtesy of another wordpress plugin: openid delegation. I’ve been using the 0.1 version for more than a year and it just works. Delegation is an openid concept where any website can delegate openid authentication to an external openid provider. This allows you to use a URL you own as your identity and also to switch provider without losing control of your openid url.

captcha

It seems the captcha plugin (capcc) I was using with wordpress has been broken for some time. Probably this happened when I installed wp 2.5 a few weeks ago. My friend Christian del Rosso pointed this out. I installed a different plugin now (yacaptcha) which both looks nicer and hopefully works better too.

So if you couldn’t comment because of this, try again.