Palagpat Coding

Fun with JavaScript, game theory, and the occasional outbreak of seriousness

Thursday, December 03, 2009

Blogger is Busted (or, Hacking your Template to Eliminate the "a[...] is null or not an object" Error)

Earlier this morning, I posted a quick test to see if backlinks are working with Blogger-powered blogs posting to FTP, as I'm doing. Turns out that they're not (note the absence of backlinkage on that page I just linked to).

Now, this isn't a huge problem for me. Would I like the ego-stroking that comes with having backlinks, showing that people like what I'm doing enough to share it? Well, sure I would. But is it worth the pain and hassle? No. So I went into my blogger settings panel, and disabled all the bits pertaining to backlinks, and removed the backlink scripts from my custom template.

Unsurprisingly, this didn't solve the underlying problem -- my site was throwing JavaScript errors! I already knew what was causing the errors: as I said in my previous post, Blogger is auto-inserting some invalid-in-my-context JS code after every post, precisely where the </Blogger> tag lies in my template. Searching around a bit more, I found a solution at Google's Blogger support forum:

Kham Level 1 8/29/09 This has done the trick for me. Wrap all instances of <blogger> and </blogger> with both the HTML and JavaScript comments. <!--/* <Blogger> */ --> <!--/* </Blogger> */ -->

Stupid, stupid, stupid! Since I can't get Blogger to stop inserting the offending code, I have to force it to be commented out! Maybe it's time to take another look at alternative blog engines...

Labels: ,

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home