Drupal articles

Block spam by alphabet

13th Jan 2025

Fighting spam is an ongoing arms race. There will always be nefarious attempts to post unwanted content onto websites, that's just the nature of the global internet nowadays, but can we keep ahead of it? Some techniques are complex, maybe using AI / natural language processing, but there are also quite simple opportunities to reject spam. 

We had a lot of contact requests come into our site that used the Cyrillic script - which is used for the Russian language. (привет!) Realistically we're very unlikely to treat any request that comes to us in Cyrillic as something worth...

Read more

Views Data Export: Sprint 2 Summary

Part of the series
Views Data Export
7th Jan 2025

I've started working on maintaining Views Data Export again.

I've decided to document my work in 2 week 'sprints'. And so this article is about what I did in Sprint 2.

Sprint progress

At the start of the sprint in the Drupal.org issue queue there were:

  • 91 open bugs
  • 17 fixed issues.
  • 81 other open issues

That's a total of 189 open issues.

By the end it looked like this:

  • 48 open bugs
  • 4 fixed issues.
  • 63 other open issues

So that's a total of 115 open issues, a 39% reduction from before!

Key goals

In this sprint I wanted...

Read more

Views Data Export: Sprint 1 Summary

Part of the series
Views Data Export
20th Dec 2024

As explained in the previous article in the series I've started working on maintaining Views Data Export again.

I've decided to document my work in 2 week 'sprints'. And so this article is about what I did in Sprint 1.

Sprint progress

At the start of the sprint there in the Drupal.org issue queue there were:

  • 204 open bugs
  • 276 other open issues.

So that's a total of 480 open issues.

By the end it looked like this:

  • 91 open bugs
  • 17 fixed issues.
  • 81 other open issues

So that's a total of 189 open issues, a 60% reduction from...

Read more

Views Data Export: Re-maintainership

Part of the series
Views Data Export
6th Dec 2024

Views data export is a module that's in use by over 100,000 sites but hasn't been maintained very well by me over the years. This is the story and the plans for getting back into healthy maintainership.

Read more

DDEV, solr, and platform.sh

5th Dec 2024

We use platform.sh to host many of our client Drupal sites, and many of those sites use Solr.

In this guide we talk through quickly matching the Solr configuration used by platform.sh and DDEV.

Read more

Cyber essentials and MAMP Pro

28th Nov 2024

We recently went through the process of applying for Cyber Essentials. Cyber Essentials is a program created by the UK government to help businesses get on top of their Cyber security. It was an interesting process for us to go through, and certainly helped us to formalise and document practices we had been doing for years.

We did hit a bit of a blocker tho for our developers, specifically on point A7.6 Use of Administrator Accounts...

Read more

Putting 1000 sites behind Cloudflare

27th Nov 2024

Keeping a PaaS product online at all times comes with a high level of responsibility. In early 2024 we set up a proof of concept setup with Cloudflare, which would allow us to make a significant ongoing cost saving whilst also playing with some really cool APIs.

Read more

Automatically generate forms from config schema

2nd Oct 2024

Drupal's form API has been brilliant for many years. Still, recently I found myself wondering why I needed to build a configuration form if I already had a schema for my config. Defining a schema facilitates API-first validation (including some pretty smart constraints), specific typing (e.g. actual booleans or integers instead of '0' or '1' strings), and even translation in Drupal. 

That last part got me thinking; if Drupal automatically provides translation forms for typed configuration, why must I build a form? I started diving into the code and found config_translation_config_schema_info_alter() which maps certain config data types to element classes...

Read more

My text filter's placeholder content disappeared!

19th Jun 2024

When I upgraded a site from Drupal 10.1 to 10.2, I discovered a particularly serious bug: the login form on our client's site vanished ... which was pretty serious for this site which hid all content behind a login!

Read more

Format Drush output for easy wins!

3rd Apr 2024

Drush, the brilliant command-line tool for Drupal, is capable of giving you its output in several ways. Its global --format parameter can be set to a type that you can use in useful ways. Most recently, I found this incredibly useful when I had made some configuration changes through Drupal's admin pages, and needed to then script those changes to automatically apply to hundreds of sites on a platform we manage.

I simply asked Drush for the value of the configuration I had set, formatted as the PHP code to set those values. Then I could drop...

Read more