Drupal

Drupal Custom Entities with Bundle Classes

Drupal 9.3 quietly introduced support for defining bundle classes in custom entities—a long-awaited feature for developers seeking cleaner architecture. But with sparse documentation and incomplete tooling, implementing it can be frustrating. Hard-earned insights and a working example help navigate this underdeveloped corner of Drupal.

Drupal Translation Placeholder Prefixes

Struggling to remember what the various prefixes mean in Drupal’s t() function? Whether it’s @, %, or :, each plays a specific role in how text is sanitized and rendered. This breakdown clarifies what each one does, when to use them, and why certain older prefixes like ! are no longer supported in modern versions of Drupal.

Resolving Drupal Data Compression (or PHP Served Data) Corruption Issues

Encountering browser errors like “Content Encoding Error” or “Cannot Decode Raw Data” in a Drupal 7 site? These issues often stem from corrupted compressed output, frequently caused by premature output—such as stray whitespace or closing PHP tags—in critical files like settings.php. Ensuring a clean output buffer before Drupal sends compressed content is key to resolving these problems.​