WORKS
Ore no Drupal
This is a tech blog of Acret Inc.
We will irregularly post contents related to web development and operation, with a focus on Drupal technology.
-
2026/08/27
Teaching Drupal to Actually Search
Almost every content-driven Drupal site eventually needs a search feature, and almost every team underestimates how much is involved in building one well. A naive approach, a Views filter doing a CONTAINS match against the node title and body, works for a handful of pages, but falls apart as content grows: it can't rank results by relevance, it struggles with partial or fuzzy matches, and every query gets slower as the node_field_data table grows. This is the gap that Drupal's Search API module is built to close. Search API doesn't perform searches itself. Instead, it provides a common abstraction layer between Drupal's entities and a variety of search backends (a plain database via search_api_db, Apache Solr via search_api_solr, Elasticsearch, and others), so the rest of the site can be built once, in Drupal's own configuration and Views layer, and swapped to a different backend later without rebuilding the search feature from scratch. This article walks through what Search API is, its core building blocks, and the practical steps involved in standing one up on a Drupal site.
-
2026/08/05
Honeypot and Antibot: Stopping Spam Bots Before They Hit Submit
If you run a Drupal site with a contact form, you know the drill: every morning there's a fresh batch of "messages" from "John" pitching crypto or discount watches. The good news is two free, lightweight modules — Honeypot and Antibot — quietly kill most of this spam without ever showing a real visitor a CAPTCHA.
-
2026/07/16
Twig, Symfony, and the Architectural Shift: Why Drupal 7 Themes Can't Just Be Ported
There's a specific kind of frustration that comes from opening up an old Drupal 7 theme folder, staring at it, and thinking: "surely I can just move this over." The CSS still looks fine. The layout still makes sense. Nothing about the design is wrong. And yet the moment you try to bring it into a current Drupal build, nothing lines up. Templates don't render. Variables come back empty. Things that used to just work now throw errors that don't even look like Drupal errors.