Needed: Movable Type mavens

Patrick here, again. It’s Sunday morning in Brooklyn.

Last night, Hosting Matters set us up with a new server (larger and more powerful, and all to ourselves, I gather), and we uploaded the complete March 1 backup of our home directory. This is why there’s been a March 1 version of Making Light’s home page visible for the last twelve hours or so at the usual location. Up until a few minutes ago, this was a version of the front page that looked all right, except that links to individual-post pages-with-comments didn’t work, and the Sidelights and Particle sections were empty, along with every other sidebar section that works by pulling data in from a file external to the main index page.

We also uploaded the March 1 export from the site’s MySQL database, and while we slept, Hosting Matters verified that the database export seemed to be okay, and re-created the database and the user. They suggested that we do a full “rebuild” from inside Movable Type, which should recreate all the internal links.

I’ve just now been trying to do that. The first thing I tried was a full site rebuild, but it crapped out and reported “internal server error” somewhere in the midst of rebuilding the second hundred individual-post pages. (A full site rebuild does individual-post pages first, then monthly archive pages, then index pages last.) The next thing I tried was an “index pages only” rebuild, which yielded the version of the front page that’s now visible, with the entire center column empty. I then tried an “individual archive pages only” rebuild, which once again failed in the middle of the second hundred pages. Finally, I made another attempt at a full site rebuild, and it failed (“Internal Server Error – The server encountered an internal error or misconfiguration and was unable to complete your request”) just after the 300-pages-rebuilt mark.

Rebuilds that fail to complete have been a constant bane of our Movable Type installation, but in the past we’ve dealt with them by simply trying again another day. Does anyone have a better idea that will get the site (at least, the March 1 instantiation of the site) up and functional now?

(Noted and of interest: You can get at the individual archive pages that are linked from the “recent comments” sidebar; you can even load the “last 4000 comments” page and get at lots and lots of individual archive pages from that. But as far as I know, until I get a full rebuild to happen, the middle column of the front page is going to stay empty.)

17 thoughts on “Needed: Movable Type mavens”

  1. I believe you can rebuild individual templates. Once the individual templates have been rebuilt, perhaps the overall build can progress.

    I’m not a maven, because I’ve only been using MT for a couple of months (because you and BoingBoing do), but I’d be happy to hack at it if you want.

  2. Log into the server using ssh, go to your blog directory (where mt.cgi resides) and create a file called “rebuild.pl” with this content:

    use strict;
    use lib 'lib';
    
    use MT::WeblogPublisher;
    my $pub = MT::WeblogPublisher->new;
    
    $pub->rebuild (
      BlogID => 1,
      EntryCallback => sub { print $_[0]->title, "\n"}, );
    

    Run that with “perl rebuild.pl” and it will print the title of each entry as it goes. If things are running aground somewhere, this will tell you where, and when the error occurs, Perl will probably tell you more on the command line than survives the CGI gauntlet.

    (I’m guessing at “BlogID => 1” because I don’t figure you’ve got more than one blog defined in your installation, of course.)

    If you want to give me the keys to the car, I can take it for a spin and listen for the noise, too. I can’t promise I’ll know jack about fixing it, but I can flail around with the best of them.

  3. I don’t know for sure, but I wonder if Google would be less likely to overwrite the cached versions of pages if the site was just down, full stop, rather than partially-up. (I’ve pinged a friend there, but he’s not in the relevant group. Is there someone with closer ties to Google, and particularly the group at Google that deals with the caching system, who can verify this?)

  4. I don’t know how to, within the context of Movable Type, make the site be “down, full stop” and work on getting it to function properly at the same time. Open to advice.

  5. Move the blog directory to a different directory. Test there. Then your commented archive pages will 404 and Google won’t clobber the cache (we hope) while you can still test in the alternate directory.

  6. I don’t know exactly how to do it, but I think you could perhaps use firewalling to shut off outside access to the blog, or some of the Apache configuration options. Anyone with more specific knowledge?

  7. Alternate directory approach is the best (and least harmful) way.

    I had never thought about the implications of a site that needs to do full rebuilds before, instead of just displaying content dynamically (like WordPress and Blogger Beta [old blogger still did rebuilds]). If you have a ton of pages things could get ugly, especially on a shared server.

  8. Michael Robert, I followed your directions, but this is what “perl rebuild.pl” spat out:

    Can’t locate object method “version_number” via package “MT” at lib/MT/ConfigMgr.pm line 27.

    Embarrassing confession time: I just realized that I’ve been resisting moving Making Light into an alternate directory because I literally can’t remember how to do it from the command line. It really has been a long time since I did anything with naked unix more complicated than directory listings and editing simple files, and I don’t want to blow anything up in my very tired and somewhat stressed-out state of mind.

  9. That’s a real weird error. Are you guys using matching versions of MoveableType ? It sounds like there is a mismatch here.

    If you still want to move the directory, command is

    mv blah newly-named-blah

  10. I recently made the move from Movable Type to WordPress myself because of these kinds of internal server errors. They’re absolutely maddening. I don’t know perl well enough to troubleshoot it, but I’ve become pretty skilled at making WordPress do what I want. If you decide to move to WordPress and need help/advice, please do shoot me an email Patrick.

    Sorry that I can’t help more with your existing problem. In the past, I’ve had similar trouble due to Perl not having the correct modules installed, or having permissions set wrong on various folders.

    On the plus side, if your database is intact, you can export it out for other software, should you choose to do so.

  11. Well, you’re probably using a different version than I am, because I copied that right off my own server, where I’d run it as a test before posting.

    Without poking around in the Perl guts, I don’t think there’s much more I can tell you. My offer’s open.

  12. (Somehow, Michael Roberts never got my email this morning happily accepting his offer to poke around inside the site. I;m glad I emailed him again — he’s looking around now.)

  13. Hmm, that “Can’t locate object method” error sounds like your Perl include path was pointing to something in the old directory. I know Perl web apps but not Movable Type specifically — if Michael Roberts wants help on the Perl side, feel free to e-mail me (address available via the above web page). Though the problem may well be fixed already, given the state of the site. 🙂

  14. There is actually a rebuild script available from Appnel Solutions that gives you a bunch of control over rebuilding options that might come in handy (you do need shell access for it). Drop me a line if you are still in need of help as well.

Comments are closed.