Drupal tips and tricks

The small things that make life easier with Drupal

Tracking the WSOD

Submitted by Frederic Marand on

At long last, I've moved the OSInet sites from shared hosting to a VDS over the 4-day Xmas period, and overall it went well.

However, with new users (dare I say bots ?) eager to refresh the site after a few hours offline, I soon had to stand about 20 hits/sec, which proved to be a bit too much on this small VDS. So I enlisted the help of APC, just like the drupal.org sysops do, and like I do on the group's intranet servers and it went really faster.

When Drupal 6.x dev always returns "page not found"... pages can still be found

Submitted by Frederic Marand on

A problem with the yet unreleased versions of Drupal 6 is that in some cases Drupal all of a sudden seems to lose all of its paths. In my case it happened when working on a port of an OSInet module from the Drupal 4.7 to Drupal 6 API.

A symptom of the problem can be seen by checking the menu_router table and finding it to be empty, although it should contain the default site navigation.

Downloading modules when drupal.org is offline

Submitted by Frederic Marand on

Drupal.org being unavailable quite frequently these days, some may find it hard to download the module of their choice.

Luckily, the downloads are static files served as public downloads outside Drupal itself: all it takes is knowing the proper URL, and they are all gathered on ftp://ftp.drupal.org/pub/drupal/files/projects, just waiting for your favorite FTP browser.

Creating Google Gadgets within Drupal

Submitted by Frederic Marand on

2009-05-24: UPDATE: now ported to D6

screendump showing the Drupal API google gadget Having recently discovered the Google Gadgets API, and being on vacation this week proved too much of a temptation: I had to build one using Drupal. Here is a way to do it, as a module creating a Google Gadget to directly search http://api.drupal.com/ from the iGoogle home page. User preferences allow searching the various versions of the API and default to Drupal 5.

First spammer working around captcha

Submitted by Frederic Marand on

After almost six months without abuse following the installation of the captcha module, a spammer found its way through it, to promote a ringtones site.

Not that it did him/her much good, since comments are premoderated anyway, but still...

Sheer luck, of astute pattern matching and module workaround ? Oh well, it's still six months of peace gained. Well worth the almost nonexistent hassle, it seems.

Updating drupal without file access

Submitted by Frederic Marand on

A few days ago, it was brought to my attention that something had been broken on the PHP-GTK community site during the 5.0 RC2 upgrade. The problem was easily identified as being codefilter.module having been removed during the upgrade and not reinstalled. Of course, not being at my office, I did not have access to the FTP passwords, but just to my admin account, and I did not want to leave the community members in the cold, so I used this small trick.