You are currently browsing the archive for the Meta category.

Update: It turned out to be a problem with the Lightbox plugin I was using. I’ve replaced it with another plugin that provides similar functionality, and the error has now gone away. Lesson learnt: having many scripts on the same page can be a recipe for disaster. Thanks Nuffnang for helping me work through this issue.

I recently added a Nuffnang ad to the sidebar — I hope none of you mind too much!

Anyway, all was going well until Internet Explorer threw a spanner into the works (well, well, which browser always throws a spanner into the works?).

It appears that on Internet Explorer 7 and earlier (using my particular WordPress template at least), the addition of the Nuffnang ad code can cause the page to fail to load with an Operation aborted error:


This error is particularly troublesome: after the hopelessly uninformative dialog box is dismissed, the page disappears and gets replaced by a navigation error page. (Thankfully, this hideous behaviour was changed in IE8, which might explain why I didn’t pick it up earlier as that is my installed version. But it still begs the question, why do people insist on using Internet Explorer?)

I’ve let Nuffnang know about the potential problem, and with any luck, it will be resolved soon.

In the meantime, I’ve made some changes to the ad code:

What this does is that it first checks whether the browser is Internet Explorer. If it is not, the Nuffnang script can be called upon directly. If it is Internet Explorer, an iframe displaying /nuffnang.html is added to the document. /nuffnang.html just contains a copy of the ad code as provided by Nuffnang placed into an otherwise blank HTML page.

Why? Isolating the Nuffnang ad code in a blank page by itself seems to avoid the error conditions as described by KB927917. But even if an error were to develop, the error would be confined to the iframe and the rest of the page can still be displayed.

If you’re having similar difficulties, give the above a go and see whether it works for you.

Tags: ,

From my blog stats:

What weird fetishes some people have.

18 Mar 2009 | 3 comments

Installing/Updating WordPress with Subversion – blogs were converted yesterday – much easier to update now!

25 Dec 2008 | No comments

To all my hopefully-existent readers, I hope you have a very Merry Christmas and a happy and prosperous 2009.

25 Dec 2008 | 4 comments

Just testing Wordbook. If all is well, this blog post should appear on my Facebook profile!

03 Oct 2008 | No comments

One of the attractions of Bluehost, my host, is the ability to ssh into your box, which makes administering your site that much easier if you know how to use the *nix command line. (See related post.)

I’ll just write about two things that I’ve worked out recently.

Lesson #1: Read the README file.

Well duh, you say. The story is, I’ve had the bash_completion script for some time (a really useful extension that makes typing on the command line that much easier), but I’ve never quite worked out why it didn’t work. Now I know why. It’s because I naively assumed that the script was the meat of it, and simply called it from .bashrc, expecting it to just work. It would, ordinarily, but I don’t have it installed in /etc which is where it expects to be (it’s in my home directory). If you have somewhere else like me, you will need to set the $BASH_COMPLETION variable and modify the script to reflect where you’ve actually put it.

Lesson #2: If you didn’t set up the system yourself, things might not be as you expect them to be.

SUITS has a bunch of useful scripts that you can use to improve your command line experience on the undergraduate IT servers, and I copied them over to my account on because I like them so much. One of these scripts sets nice colours for the command line. It was all working fine until I realised TortoiseSVN could no longer access the Subversion repositories via svn+ssh, failing with the error “connection closed unexpectedly”. I figured something I added recently was injecting garbage into the stream. It turns out it was the colour-adding script! But why? It was protected like this:

if [ -n "$PS1" ]; then
        . ~/.bash/colors

That means that it should only have been run if it was running in an “interactive” terminal, and the colour-adding script should not have been called if I was using svn+ssh. After some more poking around, I found this in /etc/bashrc (which was being called from .bashrc):

# For some unknown reason bash refuses to inherit
# PS1 in some circumstances that I can't figure out.
# Putting PS1 here ensures that it gets loaded every time.

Uhh, ok, nice work, Bluehost. I guess not many of their customers actually use ssh. At least there was a comment.

But even if it was called, why the colour-adding script was failing in the first place? It turns out that tput colors fails if $TERM is not set, which happens to be so when using svn+ssh. (Actually, this would not normally prevent me from accessing my Subversion repositories. The command line svn seems to ignore errors; however, TortoiseSVN dies the moment it sees anything untoward.) My ultimate solution was to simply pipe error to /dev/null.

Tags: , , , ,

On a blog, asides are short posts (like this one), designed to allow you to write in a more fluid and dynamic manner; as the linked article says, “The format of a weblog dictates its writing.” I’ve been looking for a place to stick up random thoughts or two, or an interesting link, and my new template just happens to allow for asides – perfect!

16 Aug 2008 | 1 comment

I thought the sky almost fell down just then when I went to my gallery2 installation (/gallery) and saw that it had a database error. “Noooo!!! I’ll have to spend hours reinstalling and uploading again!” The error in question was

An error has occurred while interacting with the database.

If you get this error, don’t panic. For me, it turned out that one of the database tables was corrupted and needed repairing. Log in to phpMyAdmin or to the mysql console and check whether any of the tables are listed as corrupt. In my case, it turned out to be g2_CacheMap.

I snooped around some forums, and in the threads that had responses (a lot of forums have questions left unanswered unfortunately), it seems like the blame lies with your host having a bad mysql setup or bad hard drives that corrupt at random. Shame on you, Bluehost.

Tags: , , , ,


It would be amiss of me not to post at least once during the month of December, but posting on the last day of 2007, that’s what I’ve almost done.

It’s reticent of me not to have posted regularly recently, as I promised to do earlier on. However, blogging is something that requires momentum – for me at least, once I start writing, I can’t stop, but it’s getting started that’s the problem. Maybe that’s why my law assignments always get written so late. I lost momentum in the lead-up to honours thesis submission and then the inability of the older version of Opera to cooperate with WordPress while I was in Hong Kong was a bit of a showstopper. But maybe I’m just making up excuses.

Writing regularly is a good thing to do: I think, like muscles, writing ability gets lost if you don’t use it. Joel Spolsky, a prominent software developer and writer who anyone interested in the business of software should read, mentioned in his blog that one of the best courses he ever took at university was one that involved copious amounts of writing: “Being able to write clearly on technical topics is the difference between being a grunt individual contributor programmer and being a leader”.

I’ll try and regain some momentum in the immediate future, and I hope that I’ll regain your trust as readers.*

* The less I write, the less people read my blog (as measured by the statistics I get). Makes sense doesn’t it?

Tags: , , , , , , , ,

After realising that I’ve been tagging most of my entries as “General”, I thought I’d go and fix up the categories on this blog. After looking at what I’ve been writing about for the last 6 months, I came up with a number of new categories, and I’ve made an attempt to recategorise everything written so far into the new categories. None of the old categories have been deleted, so your RSS feeds should still work (you can get a feed for a particular category by appending /feed to the URL).

Speaking of RSS feeds, if you haven’t subscribed to my blog via RSS, it’s easy – just click the Entries RSS link on the left sidebar.

Also, I’ve decided to license to license my blog under a Creative Commons license. Sharing is caring.


Tags: , , ,

« Older entries