Skip to main content

Posts

Showing posts with the label movable type

Updating on the fly

I thought this was a moderately clever solution to a problem, so I thought I'd share it here. A client wanted to add thumbnails for every entry on their huge movable-type powered blog site. They already had full-size pics for most posts, they just wanted a preview thumbnail version associated with each post for use in the xml feed, search results, etc. This is a static movable type powered site with thousands of entries. The standard solution would be to create a new field using RightFields and store the filename of an image their, and then somehow go through all those thousands of entries and create thumbnails, then save the thumb filename in the new field. And do a full rebuild of the site. This would work, but it was going to take forever ! The first thing to figure out was how to automatically create those thumbs. I knew that the first image in each post was the one to use, so it was pretty easy to set up a little php script that would find that image tag in the entry body, and...

Quick movable type issue/fix

Found a fix for this movabletype issue recently. I was having problems with an MT-driven site not returning search results. It would come back with a " 500 Internal Server Error " with a log message of " Premature end of script headers ". Turns out this was due to the fact that this search was running over a very large site (thousands of entries), and presumable the search was timing out. Would be nice to have more descriptive errors! Anyways, it was fixed by limiting the number of days back that the search covered via the SearchCutoff parameter in mt-config.cgi. Maybe that'll help someone and save the some time! As an aside, it may also be helpful to know that when you set the system up to include results from multiple blogs, the system does not use the template that you can modify through the MT admin - rather it uses a file that you'll have to "manually" edit on the server ( search_templates/default.tmpl by default). This is pretty clear fr...

Paging Captain Obvious...

This is an object lesson in the importance of the sanity check. I was working on reskinning a MT blog, working on the CSS files when suddenly the posts dissapeared! Well, post actually - it had just been set up, so there was just a single test entry in the system, sitting on the homepage. Mystified, I undid my changes. Still no entries. I returned everything back to its original state - still no entries. I looked closely at the code to display the code, everything looked fine. I checked on the admin side, and the entry was still there and hadn't been changed at all. I even tried using some demo entry display code from the MT site - nada. Mystified, I told the client that something weird must have happened, although I had no idea what. That's always I fun thing to tell a client! I couldn't see how it could have been something I'd changed, since all I'd touched was css code... I asked him to have the IT people restore the blog to it's original state. Of course, a...

MT4 - Amateur Hour?

I've been working on a few MT4 sites, and so far I'm less than impressed. For one, their "documentation" is hardly that. It's incomplete, and often times inaccurate. For example, while researching custom fields, the official docs show a screenshot of the custom fields form in the admin control panel that includes fields at aren't even in the actual product . Even better, when I click the "Help" button from within the MT4 control panel, I get a 404 error. Nice! And I constantly have problems with republishing not actually updating files on a static blog - what's up with that? I've even had one installation stop showing entries on the homepage altogether, even with the default main index template being used! The entries are still there on archive pages, but apparently on the main index can't find them for some reason. Sometimes, I really wonder if it's worth messing with all these CMSs - I'm trying to add a very simple feature to ...

Weird MTIfNonEmpty bug

Had a problem today with MovableType 3.2 - MTIfNonEmpty kept insisting that a field coming out of the database was empty. I sanity-checked it to death, and that damn string was not empty, but MTIfNonEmpty just wouldn't work. No idea why. So I tried a work around using another comparison tag (sorry it's late, and I don't remember what it was) - basically comparing the tag to an empty string... And this time it decided that even empty strings were not empty... WTF? I ended up fixing it by just having the MT template write out PHP to do the comparison, which of course worked fine. The only thing I could figure was that the fact that field I was doing the comparison on was an "extra field", that somehow screwed it up. Who knows?