Stream of (semi-)consciousness...

Various inane ramblings in a multimedia sauce. Wait one minute to allow contents to cool before opening.

Austerity win: my free laptop stand

Austerity win: my free laptop stand

I'm working my way through the process of getting my posture sorted out at work, so I've picked myself up an office chair which you kinda kneel on - it doesn't have a back - and perch.

That's all well and good of course, apart from the inevitable and accurate - if slightly-cruel comments - that it looks like a birthing chair, but I also needed to sort out which way my head was pointing; with my tiny laptop and a normal-height desk, I was spending most of my day with my head canted down at a 45-degree angle. Not particularly good for posture!

Anyway, being a tightwad, and not having the patience to wait for a postal delivery even if I could bring myself to spend money on a laptop stand, I decided that the easiest approach would be to nip downstairs to Argos (yup, we have an Argos in our building) and grab some of their catalogues. As an added aesthetic bonus, two catalogues placed spine-to-spine provide a perfectly-sized footprint for my laptop.

Two trips, some huffing-and-puffing, odd looks from Argos staff and a little desk-based feng-shui later et voila! We have ourselves a laptop stand.

Massive win =o)

New office!

New office!

I've been contracting as a Drupal developer for a little company called NBC (natch ;) for the last few months. During that time, I and the other developers have been stationed in a fairly compact meeting room, based around a table - quite compact, and a bit insular as we were somewhat locked away from other folks in the organisation.

Happily, a couple of weeks ago we moved ourselves downstairs to a floor full of meeja types; every other desk has a TV/VCR displaying one of the company's myriad channels - people sitting at their desks are variously typing away updating EPG information, adding subtitles, or doing any one of the many jobs associated with producing the media output for a broadcaster.

The main benefit for us, of course, is that we now have our own desks. I've never seen so much space which I can call "my own" - I'm seriously* considering installing a hammock for any long weekends we may find ourselves working through.

Oh, and since we were setting up a wireless network to connect to, we thought we'd give it a new name; we chose Kabletown for its 30 Rock-related connotations. No-one outside of the team's spotted it yet or, if they have, they haven't asked us about it. Hopefully if and when they do, the execs will see the funny side. Fingers x'd and all that...

Anyway, onwards and upwards, or something. Oh, and we have a great big kitchen with lots of daylight (huzzah!) and a table football game (which seems to be a default fixture in media organisations, for some reason...?!).

* No, not seriously at all... =o)

Allotinabox magic wheel

Allotinabox magic wheel

A colleague's friend is venturing into the murky world of business start-ups with a wonderfully-benign plan; sell seeds to weekend gardeners in a lovingly-crafted, detailed manner, under the title "Allotinabox.

The actual growable content of each "Allot-In-A-Box" only accounts for part of the overall product; the rest of the outdoorsy experience includes a cool little wheel which you can use to work out when to plant your seeds, instructions, planners and more. There's even an online community where the boxes' green-fingered owners can go to meet and chat.

It's all rather a lot to find in a box...

Drupal: strange MySQL "table doesn't exist" error caused by CCK, Features and Strongarm

Ran into a bit of a strange error today; I was getting a Drupal "table not found" SQL error on my live site after pushing an updated feature from the dev site, and then reverting the feature to get the settings back to default.

The query was:

user warning: Table 'greyhead.node_field_instance' doesn't exist query:
SELECT * FROM node_field_instance nfi 
LEFT JOIN node_field nf ON nf.field_name = nfi.field_name 
WHERE nf.active = 1 AND nfi.widget_active = 1 
in <noodle foo bar>/sites/all/modules/cck/content.install on line 187.

... So I dived into the CCK module's content.install and line 187 called this function: content_instance_tablename(), which I tracked down to content.module, where the function calls this: variable_get('content_schema_version', 0);

On both dev and live sites, this returns 6009, so the content_instance_tablename() function should return a value of content_node_field_instance, but instead seems to be returning a value which is evaluating to < 6001; i.e. the function returns the old CCK schema table name of node_field_instance, and this breaks any queries which rely on this value.

Putting two and two together, my guess was that Strongarm is over-writing the content_schema_version value in the {variable} table at some point during the execution of certain pages, which is breaking CCK's variable_get call.

So I hopped over to the command line to look into the feature files for "content_schema_version"; cd'ing to the feature's directory, I ran:

grep -irn "content_schema_version" *

... which showed that the variable was defined in the feature:

That Strongarm value

... but that it was providing the right value of 6009. At this point I figured that I was likely to be running into a strange issue being caused by the variable_get running during a variable_set, or some other such voodoo-based weirdness. Easy solution? Remove the field's definition from the feature and allow CCK to look after provision of that variable au-naturel.

So, in the end I simply recreated the feature from the live site (admin > build > features > greyhead settings > recreate) and under the Strongarm drop-down, unticked the checkbox for content_schema_version. Then I re-exported the feature and unpacked it into my MAMP localhost install, did a git commit on the localhost followed by a git push, the over on the server did a git pull, followed by drush cc all and a drush updatedb, just for good measure. Finally, I had to run variable_set('content_schema_version', 6009); using the Devel module.

Touch wood, so far, I haven't seen that error since.

Very odd...

 

Attached files: 

Hello!

Just a quick "hello" to anyone passing by who might for some inane reason be worried that this blog may actually be dead; it isn't! Huzzah, rejoice, etc.

The terrible truth of the matter is much more mundane; I've simply not been particularly motivated to write on here when microbloggage is so much more easy and accessible.

Anyway, I'd better get back to work - I'm currently in the middle of figuring out how to debug a strange Apache Solr/Drupal 6/Views 3 issue which is proving very odd...

Ttfn //Al

Syndicate content