Category Archives: WordPress

http://wordpress.org/ WordPress: Semantic personal publishing platform

Modified or not?

According to Sam Ruby, WordPress (among others) isn’t responding as expected to being sent If-None-Match and/or If-Modified-Since HTTP headers.

I’ve tried replicating the experiment with WordPress 2.0.2, 2.0.2 and 2.0.4 — they all yield the same results:

> HEAD http://planet.sfit.dk/feed/
...
ETag: "1a0c3e00da9d1d0a6e145168720f8574"
Last-Modified: Thu, 23 Nov 2006 01:20:07 GMT
...
> HEAD -H 'If-Modified-Since: Thu, 23 Nov 2006 01:20:07 GMT' http://planet.sfit.dk/feed/
...
Status: 304 Not Modified
> HEAD -H 'If-None-Match: "1a0c3e00da9d1d0a6e145168720f8574"' http://planet.sfit.dk/feed/
...
Status: 304 Not Modified
> HEAD -H 'If-Modified-Since: Thu, 23 Nov 2006 01:20:07 GMT' -H 'If-None-Match: "1a0c3e00da9d1d0a6e145168720f8574"' http://planet.sfit.dk/feed/
...
Status: 304 Not Modified
> HEAD -H 'If-Modified-Since: Thu, 23 Nov 2005 01:20:07 GMT' -H 'If-None-Match: "1a0c3e00da9d1d0a6e145168720f8574"' http://planet.sfit.dk/feed/
...
Status: 200 OK
> HEAD -H 'If-Modified-Since: Thu, 23 Nov 2006 01:20:07 GMT' -H 'If-None-Match: "1a0c3e00da9d1d0a6e145168720f8579"' http://planet.sfit.dk/feed/
...
Status: 200 OK

This seems to be working fine, or at least according to plan.

I originally suspected the reason Sam and others were getting it wrong was the use of double quotes in the ETag value, but on the other hand I can reproduce the problem with the feed from webstandards (apparently running version 2.0.2), so it seems the problem might be related to something specific to some sites, not to WordPress itself.

WP: Venus

Planet SF has been running WordPress with the FeedWordPress plugin for a while now, but it just didn’t work very well — posts were duplicated, and multiauthor blogs weren’t handled well.

Instead of fixing it, I decided to go with Planet Planet instead. Well, sort of.

Sam Ruby has put a lot of work into a refactoring of the Planet Planet code, the result being Planet Venus. Among the most significant changes is the use of a cache directory containing Atom entries as individual files. This makes it easy to slurp the posts into WordPress, which has the advantage of giving easy access to historic posts, categories and users etc.

Prompted by a question on the planet development list I finally got around to putting together a plugin that would power a WordPress installation through the use of Planet Venus.

Installation and use of the WordPress Venus plugin (svn) is straight forward — dump it in the wp-content/plugins folder, activate it from the plugins option screen, and go to the Venus option screen to configure its options: Path to Planet Venus cache directory, update interval and whether to link from posts back to their source.

Update: This plugin now lives in the WordPress Plugin Repository.

(Almost) No More Comments

I haven’t been writing much here lately, but others have.

Or rather: They’ve tried.

Some time ago I turned off trackbacks and pingbacks completely, and changed the options for comments to require moderation before anything went online.

That hasn’t stopped the spammers though — I get at least ten mails about spam comments each day, and frankly that’s just not fun.

I should be upgrading to the lastest version of WordPress, as that includes the clever Akismet plugin for catching spam, which seems to work quite well on the other blogs I run. Also, I really should finish the plugin that leverages my social network through FOAF, that’d make for a really great combination, methinks.

Instead I’ve activated a plugin that turns off comments and pings within 30 days of the posting date.

I’m sorry for the inconvience for those who wish to comment on older posts — for now it has to be like that (but do send me a mail if you’d like to comment anyway).