* warning: array_map() [function.array-map]: argument #2 should be an array in /…

Posted at 11 Aug 7:24 pm. 1 comment

You’ve decided it’s high time you upgraded your Drupal installation. That red, highlighted “FFS IF YOU DO NOT UPDATE YOUR SITE WILL IMPLODE” sign at the top of every page in your admin section is fraying your nerves. You enter your server control panel’s Fantastico screen, click the helpful “Update to Drupal 6.13?” link and hold your breath.

Green ticks appear one after another. Success!

That was easy! The world is suddenly a brighter, happier place. You go to check out your site just to make sure nothing screwed up. And lo and behold, it’s a ghastly white wasteland with a smug message something like the one below near the top of its screen:

* warning: array_map() [function.array-map]: Argument #2 should be an array in /Applications/MAMP/htdocs/drupal/modules/system/system.module on line 975.
* warning: array_keys() [function.array-keys]: The first argument should be an array in /Applications/MAMP/htdocs/drupal/includes/theme.inc on line 1720.
* warning: Invalid argument supplied for foreach() in /Applications/MAMP/htdocs/drupal/includes/theme.inc on line 1720.

Onoes!

    • Take a deep breath. Do not panic. Do not run screaming like a baby to your ISP support, which will tell you calmly that there are no errors in the sys log on their end and perhaps the only error to be had is in your head. I’m not saying I did, I’m just… I’m just saying.
    • Find your way into your admin section, usually www.yourdomain.com/admin. Peek into your Themes administration page. You will see, very conspicuously, a lack of the theme you were using.
    • Re-upload your theme. Enable it. Take your second breath as your site is restored to normalcy. But wait! Why are half your pages missing?
    • That’s right; if re-installation wipes your themes, it means it’s wiped ALL YOUR DOWNLOADED MODULES as well, save the core. I hope you saved them into a directory on your PC before uploading them to your server.
    • Upload all the modules you were using back where they belong, enable them in your Modules administration page, and reward yourself with some xkcd.

      See? Simple. Unless you’re staring at Step 4 with a slack-jawed expression of horror. It’s okay, I won’t judge you if you cry.

      tgfa and websites

      Posted at 07 Aug 12:38 pm. 0 comments

      Drupal installation 2, aka tgfa.minuteaffairs.com is up and running. All that’s left to be done is the filling in of some content (pictures, blog entries) and some prettifying of the layout.

      The convenience of the modules, which snapped together cleanly for the most part, was impressive to behold. Most of your time goes into researching which module works best for what you need, and then of course you have to configure the thing, but after that Bob’s your uncle.

      (Even if he’s not, really.)

      The last four days were the stickiest. I was trying to create a YahooGroups-type mailing list and forum archive functionality, but got thwarted by my third and last mailing list service. It started sending me emails over and over again even after I dumped the database and replaced the entire directory on the server. At which point I decided to stop wasting time and went with GoogleGroups. I still don’t know where the phantom emails were coming from.

      Postergeists, wooooo.

      But the people who put Mailhandler and Listhandler together ought to be commended. They worked like a dream, downloading all the mails in a specified email address’s chosen folder into a perfectly styled forum; pity I couldn’t find a use for them. Next time round, maybe.

      So tgfa.minuteaffairs.com now sports:
      - user signup and customized profiles (I think it allows avatars – haven’t tried, whoever it is can feel free)
      - a user list of all those people who signed up and customized their profiles
      - a calendar of events, editable
      - an event journal for brief posts on past events, also editable
      - to-do lists for all the stuff we want to do, editable in the extreme
      - polls
      - a link to the GoogleGroups mailing list
      - a great big gallery with features of its own like ratings and commentage.

      It took me about two weeks, including a week wandering around Graytown and healthy helpings of www.fmylife.com, Facebook, Twitter, www.darthsanddroids.net (don’t skip the creator’s comments below each comic; he’s often just as hilarious, if not more so) and Gmail.

      Not bad for a Drupal n00b, I must say.

      (And if it is – don’t tell me.)

      nikon d5000 vs canon 450d vs canon 500d vs canon 50d

      Posted at 06 Aug 12:36 pm. 2 comments

      Photography hooks people with its deceptive simplicity. What could be easier than point and click?

      And yet the quest for the perfect picture leads you into a land of ridiculously expensive mechanisms, impenetrable terminology and infuriating graphic-manipulation software. The last is ironic given that you likely became a photographer because you were determined to express your love of beauty despite your inability to create pretty pictures with physical mediums. (We’ll save the “But is Photoshop real photography?” debate for another day.)

      Continue Reading…

      when i was a kid…

      Posted at 02 Aug 2:34 pm. 1 comment

      … Birds were shaped like the Golden Arches.
      … All houses had chimneys, nevermind that this is a tropical country.
      … Trees had no branches.
      … Clouds were all symmetrical and fluffy.
      … The sun had spikes.
      … People had their arms in the air all the time.

      what? Continue Reading…

      positive fail

      Posted at 01 Aug 2:07 pm. 0 comments

      We’re in the car on the way back and Mum is ranting about my grandfather. “All he says is no! He’s so negative! If he would only think positive thoughts, he would find himself so much happier!”

      At times like this I could jolly well murder the ‘Think Positive!” brigade.

      Thinking positive in this day and age is no longer just a stepping stone to success, it’s being touted as the key to all but world domination. They’ve taken the encouraging “You can do it” to “You can do whatever you want to” and morphed it into an accusatory slogan with half-voiced subtext that goes: “If you can’t, hey, it’s your own fault. You’re a pathetic loser and a failure and you’ve only got yourself to blame. Please crawl into your little negative hole to wither and die there alone because you don’t deserve to be loved by anyone.”

      “Mother,” I say tightly, “He says no to change because he’s afraid and he’s afraid because he’s senile. It’s a condition. Positive thinking is not going to cure it. Are you going to tell me next that cancer can be cured by smiling?”

      As Nitemare observed correctly: “He didn’t decide to become senile because he was having a bad day!”

      I just want to say there’s no golden key to success (certainly it’s not positive thinking) that we’ll discover even if we read a mountain of self-help books. Therefore, it’s okay to fail, sometimes. Sometimes things just are the way they are. Sometimes you get Alzheimer’s or senile dementia and it’s only going to end in one way. Sometimes you find yourself in circumstances which just cannot get along with you. Sometimes something in you has just chewed all the shit you can swallow and you want out.

      It’s okay.

      In today’s hyper-achieving society, where seven-year-old kids get sent to tuition until 8pm after a day at school and carry their own weight in books, where twelve-hour workdays aren’t at all uncommon, failure doesn’t seem like an option.

      But it’s okay.

      It’s okay to not work yourself into emotional frenzies of stress and depression because things won’t go the way you want them to. It’s okay to take a deep breath and mentally let go of a goal, thereby conserving your strength and clarity of thought for the next, bigger step. It’s okay to tell yourself that failure should not and does not diminish you in any way. It doesn’t take away the love you have for your nearest and dearest and the love you have for you. It should not damage your personality, integrity, character.

      And so if I could get it through to my deeply frightened and alone grandfather, I’d tell him I can’t fathom how hard it must be for him to leep losing bits of himself every day, but we’ll be around him to love him and help him through it until the end. And that he doesn’t need to keep on striving to ‘be useful’, because we love him for who he is and everything he has been to us, not what he can do for us.

      Sit back. Take a deep breath. Let peace in. It’s okay.

      h(ype)1n1

      Posted at 30 Jul 3:29 pm. 0 comments

      In my day, when someone had a cold you gave them vitamin C, warm chicken soup and a box of tissues and sent them to their room to sleep it off. Before the week’s end they’d be better. Sometimes a particularly nasty case dragged on another week, but if it did – so what?

      “Your mother’s been ill for what, three days now?” my dad said when he called up. “Take her to the hospital.”
      “It’s not H1N1,” I retorted, reading between the lines.
      “How do you know?”
      “She’s only got a runny nose, for starters.”
      “There you go, talking like you know it all. Doctors can’t even tell if it’s H1N1 or not and there you go like you know everything.”
      My dad: well-respected and feared by many, but he has his really dim moments.

      He tried to dissuade me from going to Sarawak too when I was on Day 4 of a cough that Mum had taken five days to recover from (and promptly passed on to me). “It could be H1N1, how would you know? It could turn into pneumonia.”
      I touched down in Sarawak the next day, experienced instant recovery and proceeded to run in the rain, hike, club, drink, dance and scream myself hoarse at the Rainforest World Music Festival.

      Speaking of which, three perfectly healthy friends of mine actually pulled out of Rainforest last minute, forfeiting their air tickets and paid accommodation in a move that still makes me sigh when I think about it, even though I vowed to be understanding. The rest of us had great fun. We’d have had more fun if everybody had been present, but c’est la swine flu paranoia.

      Dear H1N1-phobic persons, please go out and get some perspective. The grip on reality comes free.

      of aspirations and life

      Posted at 28 Jul 2:56 pm. 0 comments

      We’re in Graytown and I’m on a mission. It’s fallen upon me to nudge my grandmother closer to accepting the idea of coming down to KL to live with us. Caring for my grandfather is taking a toll on her mental and physical health. She does a spectacular job, but she does it with only the help of a maid whose favorite words are “Aunty, buatlah sendiri.”

      “Why won’t you move?”
      “You can’t get cucumbers in KL for 50 cents,” she answers with that wry smile that says she knows the reason is entirely inadequate, but her advanced years have earned her the right to pretend it’s sufficient.

      That sense of economy took the place of an education, which was disrupted when the Japanese invaded Malaya. It held her in good stead throughout her marriage,  her businesses, her investments; despite her accomplishments as a homemaker I always think of her first and foremost as an astute businesswoman. Together, she and my grandfather built from nothing a life of privilege for their children, who have never experienced the childhood she describes as her own. Money has been almost an obsession, and an understandable one given their beginnings.

      So when she goes on to tell how my grandfather has been making imprudent decisions in his age, how she bites her tongue and utters not one reprimand, it comes as a bit of a shock. We’re in the kitchen, I’m weighing a nutmeg’s hard, perfumed heart in the cupped palm of my hand, rubbing my fingertips over the flat, fleshy red-orange veins that encircle it. She’s leaning back in her chair, looking tired and resigned and strangely, distantly amused.

      “I don’t want to pressure him. I told him he’s just lost his confidence. Senility, you can’t recover from. Loss of confidence, you can. Do you see,” she says, abruptly changing the topic, “how he looks so much better? He used to be so haggard and thin. Now he’s put on weight.”

      Her tone resembles that of a mother talking about a habitually wayward child, love mingled with despair, hope and denial. Unique to that mix is the pain and bewilderment of having the man she’s shared sixty years of her life and achieved so much with degenerate into a mockery of himself.

      As she lists the many elaborate eastern and western remedies she singlehandedly prepares for him, it begins to dawn on me that right now her previous triumphs have faded to near meaninglessness. For all he frustrates and pains her, at the cost of her own health, she continues to give freely. The reason is this: every day her husband is alive is a new, fiercely important accomplishment for her, time bought by her own tireless, meticulous hands.

      avillion melaka

      Posted at 26 Jul 11:47 pm. 2 comments

      Champagne-flavored bubble tea is, as we discovered, bright blue. Walking back to the car with the bright lights of Jonker Street behind us, we shared cerulean-stained kisses.

      Avillion Melaka was spacious enough, with a distinctive, elaborate outer facade, but failed to live up to the expectations Avillion PD created. The water chalets of PD were a beachside paradise, with the green-blue sea murmuring under our feet and schools of tiny fish swimming around the stilts that held our chalet up. Gauzy, dreamy ripples of mosquito netting enclosed the beds in privacy. We lounged on the spacious window seat, padded around the spa-like open-air bathroom and, from our deck chairs on the veranda, watched the sun set directly before us: a private, magnificent show of pink and flaming gold.

      None of that in the Melaka hotel, which at least still boasted a luxuriously soft bed in a comfortable room. Coupled with the company and a bottle of chilled white wine, it was a blissful private haven.

      We sang along to the radio, got lost a couple of times, engaged in heated debates, ate a lot of food, wandered among night market stalls and tried our hand at making ABC (harder than it looks). It was a timely retreat from the world and we didn’t have enough time to do all the things we wanted to do, not by far.

      But we’ll be back.

      the deal with the drupal fixation

      Posted at 24 Jul 4:49 pm. 0 comments

      About a year ago Shazza and I were talking about sites we wanted to set up. Shazza is a good friend and a bad influence. Around her I drink beer (which I usually dislike) and smoke (which I usually don’t), and I have a ball. There’s just something about her that encourages drinking, smoking and long relaxed talks at cafes or bars – and I’m not complaining!

      She was introducing me to CMSes, specifically recommending Drupal and dotNetNuke, which she works with. “CMSes?” I said in my infinite ignorance. “They help you build a whole new site with half the fuss? Hey, I’ve done those before.”

      What she was really referring to, I found out after some research, were not the pithy amateurish PHP solutions I’d churned out a couple of times to assist other even less web-savvy users tack on a variety of standardized pages to their sites. A proper CMS is capable of customizing virtually all aspects of a website you can think of and then running the whole thing efficiently. It can build from its tiny, helpful component bits a well-oiled, multi-functional monster more likely to grab your browser and rape it than let itself be displayed meekly. (This is a good thing. In some circumstances. I think.) If one knows their way around code, the sky’s the limit. Even I, who navigate PHP with the equivalent of a cane, a guide dog and the kindness of many strangers, can see new horizons opening up before my dark sunglasses.

      The Drupal vs Joomla! vs Mambo vs Zikula, TYPO3, etc. debate will continue as long as the Net lasts, so I’m not going to go into it but feel free to google if you want some entertainment. The main reasons I chose Drupal:

      • Flexibility and customization. Drupal doesn’t have as many modules or templates as Joomla! or Mambo, but the ability to customize makes up for it and more. Nothing annoys me more than reaching a limitation I can’t get around. I start flailing about with my mouse and deleting things.
      • Control. Because I’m a control freak at heart and I have plenty of love for multiple user permissions.
      • Categories and taxonomy. Taxonomy is a lovely little thing I’m only just beginning to play with, but the possibilities are wonderful. Nesting, for starters.
      • SEO. Can anyone say Clean URLs?

      So far, absolutely no regrets. The amount of time it’s saved me is phenomenal. I can spend more of my day on Facebook now.

      P.S. – The dreaded Drupal learning curve is highly overrated. Some people seem to think wrapping their heads around Drupal is akin to figuring out the Riemann hypothesis – wrong. Trial and error (programmers are more than familiar with this) will set you right eventually. Tutorials help. Or jumping in both feet first always has my vote.

      solved: home error, drupal collation error

      Posted at 23 Jul 11:54 pm. 0 comments

      My new love affair with Drupal isn’t the reason for my exhaustion – it’s the fault of a rather leaky roof. If yesterday’s careless handyman hadn’t misplaced a roof tile I wouldn’t have been dealing with a growing puddle of rainwater on the parquet floor at 4am. Today was yet more home repair related activity, beginning with the ceiling board that collapsed in the morning. Starbucks mocha flavored kisses get full credit for reviving me.

      The following is a quick solution for the common Drupal error “user warning: Illegal mix of collations (utf8_unicode_ci,IMPLICIT) and (utf8_general_ci,IMPLICIT) for operation ‘=’ query”. A lot of solutions advise you to dump your d/b and recreate it using general_ci as your collation. If this is unacceptable due to the sheer amount of hassle involved, most of the time the following should work.

      1. Access phpMyAdmin.
      2. Open your query window.
      3. Enter the following:
      4. ALTER DATABASE yourdbname default CHARACTER SET utf8 COLLATE utf8_general_ci;
        USE yourdbname;
        ALTER TABLE actions CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;

      5. Table actions refers to the name of the very first table of your database. You’ll need to repeat the same line for every database table, which will look something like:
      6. ALTER TABLE actions CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
        ALTER TABLE actions_aid CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
        ALTER TABLE authmap CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
        …etc….

        Or if you’re a little more familiar with your code you can easily write a brief script to do the dirty work for you.

      7. Press Go. Wait for sweet success.

      What’s happened, according to the MySQL Reference Manual, is that “The MySQL 3 and 4.0 character set contains both character set and collation information in one single entity. Beginning in MySQL 4.1, character sets and collations are separate entities. Though each collation corresponds to a particular character set, the two are not bundled together. If you want to start mysqld from a 4.1 distribution with data created by MySQL 4.0, you should start the server with the same character set and collation or compile it to do this by default. In this case, you won’t need to reindex your data.

      Er, okay. So long we can fix it.