You are currently browsing the archive for the Meta category.

Update: It turned out to be a prob­lem with the Light­box plu­gin I was using. I’ve replaced it with anoth­er plu­gin that provides sim­il­ar func­tion­al­ity, and the error has now gone away. Les­son learnt: hav­ing many scripts on the same page can be a recipe for dis­aster. Thanks Nuffn­ang for help­ing me work through this issue.

I recently added a Nuffn­ang ad to the side­bar — I hope none of you mind too much!

Any­way, all was going well until Inter­net Explorer threw a span­ner into the works (well, well, which browser always throws a span­ner into the works?).

It appears that on Inter­net Explorer 7 and earli­er (using my par­tic­u­lar Word­Press tem­plate at least), the addi­tion of the Nuffn­ang ad code can cause the page to fail to load with an Oper­a­tion abor­ted error:


This error is par­tic­u­larly trouble­some: after the hope­lessly unin­form­at­ive dia­log box is dis­missed, the page dis­ap­pears and gets replaced by a nav­ig­a­tion error page. (Thank­fully, this hideous beha­viour was changed in IE8, which might explain why I didn’t pick it up earli­er as that is my installed ver­sion. But it still begs the ques­tion, why do people insist on using Inter­net Explorer?)

I’ve let Nuffn­ang know about the poten­tial prob­lem, and with any luck, it will be resolved soon.

In the mean­time, I’ve made some changes to the ad code:

What this does is that it first checks wheth­er the browser is Inter­net Explorer. If it is not, the Nuffn­ang script can be called upon dir­ectly. If it is Inter­net Explorer, an iframe dis­play­ing /nuffnang.html is added to the doc­u­ment. /nuffnang.html just con­tains a copy of the ad code as provided by Nuffn­ang placed into an oth­er­wise blank HTML page.

Why? Isol­at­ing the Nuffn­ang ad code in a blank page by itself seems to avoid the error con­di­tions as described by KB927917. But even if an error were to devel­op, the error would be con­fined to the iframe and the rest of the page can still be dis­played.

If you’re hav­ing sim­il­ar dif­fi­culties, give the above a go and see wheth­er it works for you.

Tags: ,

From my blog stats:

What weird fet­ishes some people have.

18 Mar 2009 | 3 comments

Installing/​Updating Word­Press with Sub­ver­sion — nointrigue​.com blogs were con­ver­ted yes­ter­day — much easi­er to update now!

25 Dec 2008 | No comments

To all my hope­fully-exist­ent read­ers, I hope you have a very Merry Christ­mas and a happy and pros­per­ous 2009.

25 Dec 2008 | 4 comments

Just test­ing Word­book. If all is well, this blog post should appear on my Face­book pro­file!

03 Oct 2008 | No comments

One of the attrac­tions of Blue­host, my host, is the abil­ity to ssh into your box, which makes admin­is­ter­ing your site that much easi­er if you know how to use the *nix com­mand line. (See related post.)

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

Les­son #1: Read the README file.

Well duh, you say. The story is, I’ve had the bash_​completion script for some time (a really use­ful exten­sion that makes typ­ing on the com­mand line that much easi­er), but I’ve nev­er 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, expect­ing it to just work. It would, ordin­ar­ily, but I don’t have it installed in /etc which is where it expects to be (it’s in my home dir­ect­ory). If you have some­where else like me, you will need to set the $BASH_COMPLETION vari­able and modi­fy the script to reflect where you’ve actu­ally put it.

Les­son #2: If you didn’t set up the sys­tem your­self, things might not be as you expect them to be.

SUITS has a bunch of use­ful scripts that you can use to improve your com­mand line exper­i­ence on the under­gradu­ate IT serv­ers, and I copied them over to my account on nointrigue​.com because I like them so much. One of these scripts sets nice col­ours for the com­mand line. It was all work­ing fine until I real­ised Tor­toiseS­VN could no longer access the Sub­ver­sion repos­it­or­ies via svn+ssh, fail­ing with the error “con­nec­tion closed unex­pec­tedly”. I figured some­thing I added recently was inject­ing garbage into the stream. It turns out it was the col­our-adding script! But why? It was pro­tec­ted like this:

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

That means that it should only have been run if it was run­ning in an “inter­act­ive” ter­min­al, and the col­our-adding script should not have been called if I was using svn+ssh. After some more pok­ing 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, Blue­host. I guess not many of their cus­tom­ers actu­ally use ssh. At least there was a com­ment.

But even if it was called, why the col­our-adding script was fail­ing in the first place? It turns out that tput colors fails if $TERM is not set, which hap­pens to be so when using svn+ssh. (Actu­ally, this would not nor­mally pre­vent me from access­ing my Sub­ver­sion repos­it­or­ies. The com­mand line svn seems to ignore errors; how­ever, Tor­toiseS­VN dies the moment it sees any­thing unto­ward.) My ulti­mate solu­tion 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 flu­id and dynam­ic man­ner; as the linked art­icle says, “The format of a web­log dic­tates its writ­ing.” I’ve been look­ing for a place to stick up ran­dom thoughts or two, or an inter­est­ing link, and my new tem­plate just hap­pens to allow for asides — per­fect!

16 Aug 2008 | 1 comment

I thought the sky almost fell down just then when I went to my gallery2 install­a­tion (/​gallery) and saw that it had a data­base error. “Noooo!!! I’ll have to spend hours rein­stalling and upload­ing again!” The error in ques­tion was

An error has occurred while inter­act­ing with the data­base.

If you get this error, don’t pan­ic. For me, it turned out that one of the data­base tables was cor­rup­ted and needed repair­ing. Log in to phpMy­Ad­min or to the mysql con­sole and check wheth­er any of the tables are lis­ted as cor­rupt. In my case, it turned out to be g2_CacheMap.

I snooped around some for­ums, and in the threads that had responses (a lot of for­ums have ques­tions left unanswered unfor­tu­nately), it seems like the blame lies with your host hav­ing a bad mysql setup or bad hard drives that cor­rupt at ran­dom. Shame on you, Blue­host.

Tags: , , , ,


It would be amiss of me not to post at least once dur­ing the month of Decem­ber, but post­ing on the last day of 2007, that’s what I’ve almost done.

It’s reti­cent of me not to have pos­ted reg­u­larly recently, as I prom­ised to do earli­er on. How­ever, blog­ging is some­thing that requires momentum — for me at least, once I start writ­ing, I can’t stop, but it’s get­ting star­ted that’s the prob­lem. Maybe that’s why my law assign­ments always get writ­ten so late. I lost momentum in the lead-up to hon­ours thes­is sub­mis­sion and then the inab­il­ity of the older ver­sion of Opera to cooper­ate with Word­Press while I was in Hong Kong was a bit of a showstop­per. But maybe I’m just mak­ing up excuses.

Writ­ing reg­u­larly is a good thing to do: I think, like muscles, writ­ing abil­ity gets lost if you don’t use it. Joel Spol­sky, a prom­in­ent soft­ware developer and writer who any­one inter­ested in the busi­ness of soft­ware should read, men­tioned in his blog that one of the best courses he ever took at uni­ver­sity was one that involved copi­ous amounts of writ­ing: “Being able to write clearly on tech­nic­al top­ics is the dif­fer­ence between being a grunt indi­vidu­al con­trib­ut­or pro­gram­mer and being a lead­er”.

I’ll try and regain some momentum in the imme­di­ate future, and I hope that I’ll regain your trust as read­ers.*

* The less I write, the less people read my blog (as meas­ured by the stat­ist­ics I get). Makes sense doesn’t it?

Tags: , , , , , , , ,

After real­ising that I’ve been tag­ging most of my entries as “Gen­er­al”, I thought I’d go and fix up the cat­egor­ies on this blog. After look­ing at what I’ve been writ­ing about for the last 6 months, I came up with a num­ber of new cat­egor­ies, and I’ve made an attempt to rec­at­egor­ise everything writ­ten so far into the new cat­egor­ies. None of the old cat­egor­ies have been deleted, so your RSS feeds should still work (you can get a feed for a par­tic­u­lar cat­egory by append­ing /feed to the URL).

Speak­ing of RSS feeds, if you haven’t sub­scribed to my blog via RSS, it’s easy — just click the Entries RSS link on the left side­bar.

Also, I’ve decided to license to license my blog under a Cre­at­ive Com­mons license. Shar­ing is caring.


Tags: , , ,

« Older entries