Problems surrounding TypeKey and subdomains getting better slowly but surely.

One of the fun things about being a beta tester is seeing how the developers manage to overcome seemingly insurmountable problems with their code as time goes on. One of the early bugs in the new TypeKey authentication system in the upcoming release of MovableType 3.0 had to do with a bug that cropped up when your install of MT and your blog were on differing domains. Part of the process involves the setting of a cookie by the TypeKey service which the code in your templates then reads in to determine whether or not a user has successfully logged into TypeKey. The TypeKey cookie was created based on the domain of where you have MT installed so if your blog was on a different domain, or sub-domain, from your install of MT then the code in your templates wouldn’t locate it when trying to determine if you had signed in or not.

One attempt to fix this problem involved trying to make the display of individual archives in such a situation dynamic by having you click a link before presenting you with the form. This worked, more or less, but broke other things like any PHP includes you were using in your template along with requiring upwards of five clicks or so before you could leave a comment (I wrote about this problem in this entry here). The solution was a kludge and it felt like one.

The latest version of the beta software takes a new approach and it seems to work pretty well, though it’s not quite perfect yet. Still, it’s damned clever. From what I can tell the new code calls a JavaScript to handle the setting and reading of the cookie like before, but the JavaScript itself is actually a part of the MT-Comments.cgi script. In essence, a subroutine of sorts within the code for handling comments. Why this works is beyond me and I’ve not looked closely at the code to see exactly what it’s doing, but the end result is a static page that handles signing in and out of TypeKey on domains other than where the MT install is located without running into the cookie confusion problems of the original method. Signing in and out of TypeKey works as it should and nothing breaks in the process.

There are still two outstanding issues with this method for folks using Internet Explorer 6 that aren’t any fault of Six Apart’s as near as I can tell. The first is that IE 6 still complains about leaving a secure page for a unsecured one after logging into TypeKey when it tries to redirect you back to your blog and the other one has to do with IE blocking cookies set by domains outside of the one you’re currently viewing. The first problem is annoying, but the second one causes your templates to act like a user didn’t successfully login to TypeKey even though they did. I was able to confirm this second issue by clicking on the little eyeball symbol at the bottom of the IE window and telling it to allow Jenkins (my host domain) to set cookies under SEB and suddenly the login was working as it should. Neither of these problems show up under FireFox and neither is really the fault of SA, though I’d imagine they’ll get a fair amount of complaints over both if they’re not able to address them somehow. Still, they’ve managed to figure out a pretty clever way around a problem for which their first solution was a terrible kludge and it inspires one to think they’ll be able to find a solution to these two remaining issues as well.

Oh, there’s one other minor issue with comments under this most current version: MT launches the rebuild process in the background and then returns control to you immediately. This means that it looks like the comment didn’t submit properly as the page won’t have been rebuilt before you’re sent back to it. As a result, folks are submitting their comments two or three times in a row. So, if you don’t see your comment right away try refreshing the page a couple of times before submitting it again.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.