Customized Suzuki Intruder in French village
Photo: Copyright © 2014 Eelke Blok


Proposal: Modernise the Drupal update framework

The current Drupal update framework (roughly: hook_update_N) is quite old. It is still firmly rooted in the procedural origins of Drupal. Also, it has several shortcomings. Some of those shortcomings were addressed in the new(ish) hook_post_update mechanism, but that does not replace the old system, it only augments it for update code that needs the full Drupal framework to be available.

This blogpost is a repost of an issue I created in the Drupal Ideas issue queue. The proposal is inspired by Laravel migrations. These work by defining a class in a pre-determined location and...

The tale of the mistranslated plurals

Recently, I ran into a strange issue with a Drupal site. Phrases that were based on a count, using the formatPlural() method to determine the correct phrase to report a count, were all translated with the phrase meant for a count of 1. All of them said e.g. 1 vraag or 1 reactie (Dutch for 1 question and 1 comment), even when there were more than one, or in some cases no questions, comments, or whatever the relevant phrase was.

Running Drupal Javascript tests on Vagrant

The last three days, I was at the code sprint for the Drupal Camp Munich 2016, hosted at the Hubert Burda Media offices. It was a great experience. It was my first community code sprint, I've met some great people and I've learned a ton in three days. I have to thank the organizers of the sprint as well as the camp organizers, and of course my employer One Shoe to give me this opportunity. We have been working on the Media Initiative, to get a solid Media solution into Drupal core in an upcoming minor release (e.g. 8.3 or 8.4). Christian Fritsch, one of the main developers for the Media...

Debugging Drush with Eclipse and XDebug

Update 15/4/2017: This is a fairly old post, by now. I've done a more recent post on debugging drush on a setup with PhpStorm and Vagrant.

Drush is a command line tool to interact with the Drupal Open Source CMS (Get it? DRUpal SHell). It is an invaluable tool that many Drupal developers love once they start using it. Another tool I personally love greatly is the XDebug PHP debugger. I use it almost daily to quickly find out what is going on in a PHP website I am working on. It can be a pain to set up, but once you have it, firing up a debugging session is as easy as hitting a...

Finding number of Drupal-nodes created per hour in a single query

For a customer I've been running an import of old content into a Drupal installation and I got the feeling that the process seemed to run slower and slower. We say "meten is weten" in Dutch ("measuring is knowing"), so I wondered if it was possible to write a single SQL query to find out how many nodes were created per hour since the start of the import. This is the query I came up with:

Henrik Sjökvist: The benefits of centralized contrib hosting

I've recently been saying that one big advantage Drupal and WordPress have over Joomla is the centralized hosting of "third party" contributions (plugins/extensions/modules). Yes, Joomla has the extensions directory, but come actually downloading the software, you get directed to the individual developer's island website to do the download (where you might actually need to first register, are likely to needing to do some digging to find the actual download, etc.). This makes evaluating Joomla contributions a tedious task, but it also emphasises a feeling that the Joomla universe is...