Creative Commons License
This weblog is licensed under a Creative Commons License.

« December 27, 2005 | Main | January 1, 2006 »

December 28, 2005

Yahoo! hosted Movable Type rebuild fix

When got done moving my boy's blog and this technology blog over to the officially supported Yahoo! Movable Type solution, I noticed that my main blog pages weren't rebuilding when I changed an entry or posted a new entry. Turns out there is a problem with editing templates - the "rebuild_me" flag gets turned off as soon as you save any changes to the template. In the standard version of MT 3.2, there is a checkbox when editing your template that says "Rebuild this template automatically when rebuilding index templates". This checkbox is missing in the Yahoo! implementation, and the form is defaulting to setting that flag to 0 whenever you save a template.

This manifests itself as a pretty bad bug - the main blog page is not automatically republishing when a blog entry is added. A bug that was super easy to find if any testing of modifying templates had been done. Makes one wonder. Anyway, after reporting this bug to Yahoo! Small Business support, they helpfully responded with instructions on how to set up a blog with Movable Type. When I pointed out that I already knew how to set up a blog and furthermore hadn't asked for help setting up a blog but rather had reported a bug, they responded with "oh, in that case, we'll look into it" and I haven't heard anything since last Saturday.

So while I was (am still) waiting for them, I figured out a work-around.

Edit /blog-mt/lib/MT/WeblogPublisher.pm. At line 596 (at least in the version I have now), there is this statement:

if (!$tmpl->build_dynamic && !$param{Force}) {
next if (defined $tmpl->rebuild_me && !$tmpl->rebuild_me);
}

Comment out the "next if" statement with '##', and volia! all the index templates rebuild with each post. Suboptimal solution, as the site javascript and stylesheet don't need to rebuild with each post, but they are small and quick to rebuild, and at the main blog page rebuilds, which is critical.

Now let's see when Yahoo! fixes it.

Comments