Thursday 18 June 2009

Movable Type 4.261

Just released, fixing the perl error I had. Thank you Six Apart!

Thursday 11 June 2009

Movable Type 4.26

Just upgraded to 4.26, mainly bug fixes in this release.

Update: Ugh, downgraded to 4.25 as I’m getting a Perl error from one of the scripts. Will upgrade again once I know what’s wrong.

Sunday 28 December 2008

Perl Hacking

In my spare time today, I decided to conclusively get to the bottom of why the Blog Cloner plugin, that comes with Movable Type, always fails to load and fills my activity log with hundreds of errors. I never just sat down and tried to figure it out from scratch so I’d just disable or delete it, and clean out the errors from the log. I needed to think about it logically, and this is what I did.

I noticed that it didn’t happen if I had a clean install of MT, so I figured that it must be one of the extra plugins that I use.

So I started adding them one by one to a clean install.

It didn’t take long for the error to appear… and it was caused by AdminLinks.pl. This is a really old plugin I’ve used since 2004 to add links to my entries that point directly to the edit entry page in the admin interface.

Now I’m not a programmer, I just know bits and pieces of a few languages, the absolute basics. So to work out exactly what the heck this plugin was doing took me a while!

The original usage would be something like this:

<MTAdminOnly>
<a href="<$MTAdminLink type="editentry"$>">Edit Entry</a>
</MTAdminOnly>

I noticed in my testing that for some reason it wasn’t even working correctly any more. Instead of putting the AdminEdit tag inside the AdminOnly, it was closing AdminOnly and then putting the edit link. Not particularly helpful!

I only ever used it to add Edit Entry links, so I decided I’d strip out all the additional options, and reduce it to just one tag which I called <$mt:AdminEditEntry$>

After a few hours trying to follow through the existing code, update some of it to the new MT4 techniques and fix what was broken, I managed to get it working!

I also decided to make the plugin use the existing Movable Type admin cookie, instead of having to keep setting an additional one just for this purpose. To do this, I had to add CookiePath / to my mt-config.cgi, as suggested by Jay Allen in 2006.

Friday 13 June 2008

Movable Type Open Source 4.2 RC2

I attempted to upgrade to MTOS 4.2 RC2, which turned out to be a bit of a bad move. I’m really not ready for it!

I took a backup of all my files and the database first, and I am very glad I did as I ended up reverting back to it.

4.2 will completely break my AJAX comments, and I don’t yet know how to sort that.

I think I’m going to have to set up a test server and keep this blog and that separate until I’m sure it’ll work straight away. After the amount of time I spent getting 4.1 up and running, I don’t particularly want to break it completely for days on end.

Wednesday 04 June 2008

Movable Type Open Source 4.1

After what seems like forever, I have finally managed to get Movable Type OS 4.1 installed and running perfectly on my Slicehost slice.

It has taken me a few months to get to this stage, mainly because I’m not very good with Linux – Ubuntu in particular. Lots of trial and error was the order of the day for sure. Thankfully it is very easy to start again if you mess up, you just need to rebuild your slice and the slate is wiped clean. I lost count of the times I rebuilt my slice!

I thought it would be an excellent idea if I documented every configuration change and command I performed each time, so I would be able to get back to where I was before rebuilding but also just before I screwed up. This made it much easier to work out what I was doing wrong. A big thank you to Google Docs!!

I started out using Lighttpd as my web server, but I kept having problems with FastCGI, so in the end I decided to dump it for Apache. Sure it’s a heavyweight and uses more resources, but I understand it more!

I also had a few problems getting some of the required Perl modules installed through CPAN, but I eventually compiled them manually and things went more smoothly.

When it came to upgrading my old blog from 3.36 to 4.1 I originally just overwrote the old files with the new ones, this was not a good idea – mainly because it didn’t bloomin’ work! After I deleted the old files and only used the new ones, it worked!

I also had some major problems getting comments to work. My templates are highly modified, and so I had to update a few areas to support 4.1 properly, and my AJAX-ified comments really didn’t! I also had an issue with accepting TypeKey authenticated comments but that I found to be an problem with ME using MY TypeKey account – apparently I can’t do that any longer and just get “Name and email address are required”. Not the most helpful of error messages. Once I tried it with a totally unrelated TypeKey account it worked.

I fixed my AJAX comments by updating Prototype and Scriptaculous – not sure why I had to, I just did!!

While testing posting comments I found that it was taking ages to actually post one. Using the excellent Temper plugin by Timothy Appnel, which stands for TEMPlate profilER, I discovered that it was the Google Sitemap and Archive Index templates that were causing trouble – both taking almost 25 seconds to rebuild. I have disabled the Sitemap for the moment, and I decided to change the Archive Index around a bit. Instead of showing a link to every entry I’ve posted, I’m now showing just the last 6 months, and then links to the monthly archives. This has reduced the build time from around 22 seconds to a much more reasonable 1-2 seconds!

I believe I have squashed every bug I’ve come across in the migration process, and I am happy to replace my old blog with my new one – not that much will have changed from the outside!

There are still a few little things here and there I need to address (installing SendMail is one), but they’re on the back-end and nothing for anyone else to worry about.

So welcome to Movable Type Open Source 4.1 and goodbye Movable Type 3.36.

Thursday 18 January 2007

Movable Type 3.34

The latest version of Movable Type was released yesterday so I upgraded this morning. It fixes a few XSS vulnerabilities, but not much else. It does add more FastCGI support, but I can’t use that as it’s not supported on this web server. Boo!

I’ve copied the 2 hacks over that I need, an additional parameter in Mail.pm for sendmail so notifications actually get sent and a complete modification to AtomServer.pm so Nokia Lifeblog on my N70 works. Everything else should just work as before. How painless!

Thursday 10 August 2006

Movable Type 3.31

I’ve finally bitten the bullet and installed Movable Type 3.31 on here. I’d been holding off upgrading until all the plugins I use had been upgraded but it doesn’t look like one of my favourites ever will, which is very disappointing. I may have to try to work out how to convert it from BigPAPI to Transformer myself, unfortunately I don’t know a lot about how Perl works so it might be too big a job for me. I’d hate to lose the functionality that particular plugin gives me. I’m still waiting on one of the others to be updated, but the author is planning on releasing it soon.

I haven’t gotten everything upgraded yet, there are some tweaks still to do but these are mainly behind the scenes. Increasing the size of text entry boxes, adding an Updated On button, adding some quicktag buttons etc. Nothing exciting really… just stuff that makes my life easier as blog owner.

I am also hoping that I will be able to re-enable commenting. After being hit by automated attacks my server was overwhelmed and Perl kept locking up as all the processes were being used by the comment script. Hopefully this is all over now, and maybe I can accept legitimate comments again.

Update: Apparently I can’t enable comments yet. No sooner had I allowed comments on this post and my server was hit by a distributed spam attack which disabled Perl completely for hours. Grr!! I HATE SPAMMERS.

I’m going to have to find another way to allow commenting, maybe obfuscating the URL somehow? *sigh* This is most frustrating.

Update 2: That plugin I was talking about before… and not being sure if it would ever get updated. Well it still hasn’t, but I had a go at fixing it myself and it appears to be working. All in all it just needed 2 lines changing, not as bad as I first thought!

quack - © 2002-2018