Since upgrading to the latest version of moveabletype I’ve been experiencing a litany of issues getting this blog to rebuild properly. So far attempts to fix that have led to me ditching the previous template for this front page (hopefully it’ll be back soon) and now to making a slight change to the MoveableType code and switching off monthly archives.
Right now, it seems to be working, but I’d rather like to get monthly archives back. And my old design. Hopefully within the next few days….
UPDATE: It seems that MT wasn’t doing all the checks it needed to in the ‘rebuild_file’ function of MT.pm. I’ve taken out the previous code:
defined($html) or
return $mt->error($category->id ?
$mt->translate("Building category '[_1]' failed: [_2]",
$category->id, $tmpl->errstr) :
$mt->translate("Building entry '[_1]' failed: [_2]",
$entry->title, $tmpl->errstr));
which was failing for monthly and individual rebuilds because $category wasn’t set, and for monthly builds because $entry wasn’t set, and replaced it with:
if (! defined($html)) {
if (defined($category)) {
return $mt->error($mt->translate("Building category '[_1]' failed: [_2]",
$category->id, $tmpl->errstr));
} elsif (defined($entry)) {
return $mt->error($mt->translate("Building entry '[_1]' failed: [_2]",
$entry->title, $tmpl->errstr));
} else {
return $mt->error($mt->translate("Building archive type '[_1]' failed",$at));
}
}
And that seems to have done the trick.
ANOTHER UPDATE: As soon as I posted this I began to suspect it hadn’t worked and of course it hadn’t. This new code makes sure that errors are only thrown when they should be, so unaffected templates (such as the index page) will update correctly. I’ll have another go at fixing it properly next week.