The Restricted HTML Format That Forced Me to Write Better Code Examples
This site's articles get published through a Drupal role with exactly one text format available to it: restricted_html.
This site's articles get published through a Drupal role with exactly one text format available to it: restricted_html.
Every article on this site was, for a little while, quietly saying "Submitted by Lars Nielsen" twice. Not in two different places on the page where you might excuse it as intentional — stacked directly on top of itself, in the same footer, half a second apart in the markup.
I upgraded this site from Drupal 10 to Drupal 11. The Drupal part went fine, eventually. What actually took the site down for four minutes had nothing to do with Drupal at all — it was a missing setgid bit, and I only found it because I've learned not to trust a Drupal error log to tell me the whole story.
Most guides to enabling REST or JSON:API in Drupal tell you to go to /admin/config/services, tick some checkboxes, and save. That's fine advice for a one-off experiment, and terrible advice for anything you intend to depend on.
Drupal ships a sensible robots.txt. It blocks the admin paths, the login and registration forms, the search pages, and the node creation forms. For a single-language site it does the job.
I run a site in Danish and Swedish. On that site, almost none of those rules do anything.
Set opcache.save_comments=0 on a Drupal site running annotation-based plugins, rebuild caches, and you get this:
Most Drupal search articles stop at "and now it works." That is the easy half. The hard half is the phone call three weeks later where someone points out that searching for the company's own name returns a 2019 press release above the About page, and nobody can explain why.
Drupal's configuration management system is one of its most powerful features for maintaining consistency across development, staging, and production environments. When it works well, deploying a change is as simple as running drush cim -y. When it goes wrong, you are staring at UUID mismatches and hash errors.
The drupal/graphql module v4 provides a schema-first GraphQL API for Drupal 10 and 11. Unlike the JSON:API module, which exposes your entire entity structure automatically, GraphQL v4 requires you to define your schema explicitly. That extra work pays off: you get a clean API surface that reflects your application's domain, not Drupal's internal data model.
Views is the most used module in the Drupal ecosystem and also the most underused — most developers barely scratch the surface of what it can do programmatically.