MainDoctor WhoMusicSoftware
Main Page

Alden Bates' Weblog

February 2010 Archives

February 21, 2010

Paged Archives 1.4

Filed in: Movable Type.

[Paged Archives Logo]
I was totally not going to upgrade to Movable Type 5.1, but then I was emailed by German user Elisa Stulpe, who said that my Paged Archives plugin wasn't working in the new version of MT.

So. Long story short, I've just released a new version of the plugin, which you can download on the Paged Archives page. The new version only works with MT5.1, so if you're still running MT4.3 or what have you, stick with version 1.31 of the plugin.

I took the opportunity to fix a few things as well. One was that someone mentioned that <b> is a depreciated tag, and may stop pages validating. The current page in the page listing is now bolded using a <span> tag with a class of "pacurrent" set on it, so if you want to change the styling in your css, you can apply it to that class.

Also, there's a new setting that someone asked for a couple of years ago (Yes, that's how long it's been since the last version two years).

Also, now when PA writes the pages out, it runs them through MT's encode function with whatever your chosen Chartype is. This may seem an odd thing to need to do, as surely everything's stored internally in your chosen encoding, but apparently it's the right thing to do.

The only thing I didn't get done on my to-do list was to add documentation links to the tags. When you're editing a template, a list of available tags appears in the right-hand column. Normally the tags are linked to the documentation for that tag, but the tags for Paged Archives all point to Google searches instead. So far as I can tell, the only way I can fix this is by completely restructuring the plugin to use the new style "registry" introduced in MT4. Eh.

Tl;dr: There's a new version of Paged Archives, but only for people running Movable Type 5.1.

Posted at 2:53 PM | Comments (26)

February 13, 2010

Upgrading a server to Movable Type 5.1

Filed in: Movable Type.

As I'm informed by a user that Paged Archives isn't working under the new Movable Type 5.1, I'm going to have to install the new MT on a test server so I can fix my plugin. Because I know from experience that upgrading a Movable Type install is hideously tortuous, I'm going to document the process here in the hopes it may help someone who is going through the same process.

Step one, obviously, is to download MT51. I note as I do that the zip file containing MT5.1 is listed as 8.5MB 50% bigger than that for the previous version. Although that appears to be inaccurate, as the zip file I download is only 6.8MB.

Step two is to unzip the thing and rearrange the directories into a more sensible order. The contents of a Movable Type zip always seem to be in a strange order which never makes any sense to me and never configured how I'd expect a live server to look. Maybe this is why it doesn't have an inbuilt update system like Wordpress. Once I've shifted everything around, deleted the useless empty directories, the php directory (since I don't use dynamic publishing) and the plugins I don't use, I zip everything back up and upload it to my test site.

While I'm waiting for it to upload, I notice a box on the download page saying "Easy to use, easy to install - Movable Type is easier to use than ever before, with a redesign user interface and a brand new installation wizard." A "redesign user interface"?

The upload done, I log into my site's control panel and use the File Manager they provide to unzip the file. Of course, because I'm using zip instead of gz, it means all the scripts have to have their execute bit manually set, but at least unlike gz it doesn't default the file owner to something Apache can't access, as it seemed to do last time I tried that.

Step three, run the upgrade script. This gives me a screen with "Upgrading database...", an empty box and a spinning blue barber pole. I go do something else for ten minutes, and come back to find it in exactly the same state. I hit back and click the button again and go an play a game for ten minutes. The same thing happens. Uh, maybe the update was successful? I go to the main mt script, and it kicks me back into the updater which doesn't work. Because I'm insane, I humour it by clicking on the button again and getting the same result.

OK, maybe there's strange incompatibility between Chrome and MT's upgrader. I load up FireFox and do step three again. While that's running, I check the Upgrade Guide to see if it has any relevant info. And ten minutes on, Firefox is having the same results.

After catching up on Lost, I decide to try the "fresh installation" mentioned on the Upgrade guide, so I delete/rename the existing files, and extract the zip file again. This time, it works! Well, as far as things actually appearing on the screen goes, that is. Partway through it crashes to a halt with "Error during upgrade: Can't call method "site_path" on an undefined value at lib/MT/Upgrade/v5.pm line 417."

Luckily this page has information about the problem and suggests moving the "themes" directory into the directory where MT is. Even though I'm not using themes. Finally the upgrade script successfully completes and I can get to the MT back end.

Running the upgrade script three times seems to have the consequence that MT thinks I have three websites or something. There's probably a way to delete the extra ones, but since it's only a test server, I don't particularly care. It's installed, and I can test the Paged Archives plugin with it.

Now everything's ready, I go to the blog's plugin page and get the error "Can't call method "label" on unblessed reference". What? Assuming that there's some major incompatibility in PA which is hosing the plugins page, I delete PA. Same result. I delete the only other plugin I have there. No change. Another Google gives me this post from January, which describes the same problem, but is unanswered.

Aha, apparently it was related to the themes directory (again). I'd ended up with both of the themes directories from the zip in the same place. One was meant to be in the directory with my static files, the other was meant to be in the MT directory. Once I separated them into the right places, it worked again.

Now to get PagedArchives working with it. It looks like some of the functions I was relying on have moved. I suspect it may require a separate version of the plugin for MT 5.

Posted at 12:58 PM | Comments (1)

Search


Archives

Tetrap.com Site Map