Searching an issue on with jQuery.grep

On people are reporting a lot sloppy reports of error lines. The issue is about
Undefined index: [xyz] in line ...

But what are the names of the failing indexes?

jQuery has a nice grep so lets use it.

How to get that site on localhost?

drush logo

Make sure you have your drush aliases file setup properly. Below a snippet from my b2b.aliases.drushrc.php

$aliases['dev'] = array(
  'uri' => '',  'root' => '/Users/clemens/Sites/',
  'path-aliases' => array(
    '%dump-dir' => '/Users/clemens/Sites/',
    '%files' => '/Users/clemens/Sites/',

Now we can run

drush rsync @b2b.prd

Git issue branch ... the sandbox route

I'm working on a patch to implement issue triage for Dreditor

But for ease of use and teasing in testers git issue branches would be great which are underways.

So in the mean time I use a sandbox for this. But how to get dreditor code into my repo?

  1. First create a sandbox on d.o. This gives to access to a new git repo.
  2. Ignore the initial git instructions
  3. Clone dreditor according the git instructions

    git clone

Using ctools modal forms for node edit

For a drupal 6 site I needed a node edit overlay. This is what I did.

Define the urls ajax/node/%node/edit and nojs/node/%node/edit. The idea is to use path similar to the normal drupal paths just prepended with what ctools modal needs. It needs are minor in that the url path must contain a string nojs and in this case a class attribute ctools-use-modal.

function annotate_ym_menu() {
$items['nojs/node/%node/%'] = array(
'page callback' => 'annotate_ym_ajax_node',
'page arguments' => array(0, 2, 3),

update module with a twist

I just did an upgrade from the calendar and date module of which calendar needed to move from 6.x-2.x-dev to 6.x-2.4 version which seemed a pitb exercise. I hope I missed some skills :-p

The following command was not working

drush upc calendar-6.x-2.4

So what I did was download the latest version offsite. Then diff the module trees.

cd /tmp
drush dl calendar-6.x-2.4
cd /my-site/sites/all/modules/calendar
cp -r /tmp/calendar/* ./

I like Universal Subtitles website.

Logo of Universal Subtitles
I recently discovered the site which is a gateway to online video material and allows us to subtitle online videos. In the past I tried to do something similar with (offline) with an arcane editor using BUedit. With that system I managed to add subtitles to this video of which I like the animal.

Who is currently online

I want to run svn up on the site but I need to offline it first. So who is online?

SELECT name, mail, (unix_timestamp()-access)/3600 AS hours
  FROM users
  HAVING hours < 1
  ORDER BY access;

Or for short

drush sql-query "select name, mail, (unix_timestamp()-access)/3600 as hours from users having hours < 1 order by access;"

Bookmarklets tips from the Drupal developement mailing list

Quotation would be nice but I deleted them from my mail :( ... hope to edit this one some day.

== below is not by me ==


if(document.URL.indexOf('XDEBUG_PROFILE')<1) { 
  var sep=document.URL.indexOf('?');sep = (sep<1)? '?' : '&';

Switch from to

if ( /dev\./.test(location.href)){

And more

There are a handful of such useful freebies (including the one I did for DBG

mysql on mac

(this is my scratchpad)
I installed mysql on a mac straight from mysql website. Not sure whether that was a wise decision.

cp /usr/local/mysql/support-files/my-medium.cnf /etc/my.cnf
vi /etc/my.cnf 
/Library/StartupItems/MySQLCOM/MySQLCOM stop
/Library/StartupItems/MySQLCOM/MySQLCOM start
free form: 

Using cron to update a site and prepare the backup

For a site on my VM I needed an svn sync and the backup files on my developer site.

I initially didn't want to install backup_migrate module. This was partly due to my arcane workflow which is of course by hand and unfamiliarity with back_migrate module.

So this is what I deviced

test_site@serverVM:~$ crontab -l
# m h  dom mon dow   command
*/7 * * * * wget -O - -q -t 1
*/5 * * * * /home/test_site/svn-up 2>&1 > /home/test_site/svn-up.log
* */1 * * * /home/test_site/ant-backup 2>&1 > /home/test_site/ant-backup.log