Skip to main content
Home
Drupal life hacks

Main navigation

  • Drupal
  • React
  • WP
  • Contact
  • About
User account menu
  • Log in
By admin, 28 November, 2025

Why Direct Database Queries in Drupal Are Dangerous: Understanding Entity Access and Real-World Failures

When working with Drupal entities, many developers assume that access control “just works.” This is only partially true. Drupal does provide a robust access system — but only when you interact with entities using the Entity API.

However, if you run raw SQL queries, write custom EntityQuery logic, or misconfigure Views, you can accidentally expose sensitive content to unauthorized users.

Tags

  • Drupal
  • Entity Access
  • Access Control
  • EntityQuery
  • Drupal security
  • Views
  • SQL Queries
By admin, 27 November, 2025

Using PostgreSQL with Drupal: Is It a Good Choice in 2025?

Drupal has supported multiple database engines for many years, including both MySQL and PostgreSQL. While MySQL remains the de-facto standard across most Drupal installations, more developers today are exploring PostgreSQL as an alternative — especially those who already rely on it for enterprise applications and microservices.

But is PostgreSQL a practical choice for a real Drupal project in 2025?
This article breaks down everything you need to know.

Tags

  • Drupal
  • PostgreSQL
  • MySQL
  • Drupal Performance
  • Drupal Development
  • Database Engines
By admin, 22 November, 2025

🔗 A New Entity Links Filter and CKEditor 5 Plugin in Drupal 11.3

Automatic Entity Linking, Smart Suggestions, and Linkit-style UX — Now in Core

Drupal 11.3 introduces a long-awaited feature: native support for linking to entities directly from CKEditor 5, powered by a new Entity Links text filter and a built-in Entity Link Suggestions Plugin.

If you ever used Linkit, this will feel very familiar — but now it’s supported natively by Drupal core and integrated with the new Link Target Handlers architecture.

Tags

  • Drupal
  • CKEditor 5
  • Entity Links Filter
  • Link Suggestions
By admin, 21 November, 2025

🔗 Deep Dive into Entity Link Targets in Drupal 11.3

How Drupal Finally Solved URL Generation for CKEditor 5

Drupal 11.3 introduces a major improvement to how URLs are generated for internal entities, especially when working inside CKEditor 5. The new Entity Link Target system allows entity types to declare exactly how their hyperlink should be generated — whether they represent content, files, media, or even virtual objects like menu links.

This article goes far beyond the official change record, providing a full technical deep dive with flow diagrams, architectural notes, and production-ready examples.

Tags

  • Drupal
  • CKEditor 5
  • Entity Link Target
By admin, 20 November, 2025
Drupal 11.3: Introducing the TwigAllowed Attribute for Safer Twig Templates

Drupal 11.3: Introducing the TwigAllowed Attribute for Safer Twig Templates

With Drupal 11.3, the way Twig templates access object methods has received a significant upgrade. The new TwigAllowed attribute provides developers and themers with a more secure and explicit method to control which object methods can be called from Twig.


The Problem with Legacy Method Access

Before Drupal 11.3, Twig templates could automatically access certain methods of objects based on magic prefixes like get, is, and has. For example:

Tags

  • Drupal
  • TwigAllowed
  • Twig
  • Drupal security
By admin, 18 November, 2025
New Validation Features in Drupal 11.3: Sequentially, CompositeConstraintInterface, and AtLeastOneOf Optimization

New Validation Features in Drupal 11.3: Sequentially, CompositeConstraintInterface, and AtLeastOneOf Optimization

Drupal 11.3 introduces several important improvements to the validation system, making it more flexible and fully compatible with Symfony. In this article, we’ll cover three key updates:

  1. CompositeConstraintInterface – the interface for composite constraints.

Tags

  • Drupal
  • Validation Features
  • Composite Constraints
  • Sequentially Constraint
  • AtLeastOneOf
  • Symfony Validator
  • Custom Validation
By admin, 1 November, 2025

Tracking State Changes in Drupal 11.3: New getValuesSetDuringRequest() Method

Published in Drupal Core 11.3.0

Drupal 11.3 introduces a new capability for module developers: a method that lets you track changes to state values within the lifecycle of a single HTTP request. This enhancement brings better transparency, logging, and security to operations involving state storage.

In this article, we’ll explore what changed, why it matters, and how you can use it.


✅ What’s New

A new method has been added to the Drupal\Core\State\StateInterface:

Tags

  • #Drupal Planet
  • getValuesSetDuringRequest() Method
By admin, 31 October, 2025

✅ Drupal Constraint Plugins Are Moving to Named Arguments: What You Need to Know

Starting in Drupal 11.3.x, validation constraints (Constraint plugins) — which are wrappers around Symfony Validator — are transitioning to a new way of passing parameters: named arguments.
This is part of a broader effort to prepare for Symfony 8, which will be included in Drupal 12.

In this article, we’ll look at what is changing, why it matters, and how you can update your custom constraint plugins safely.

Tags

  • #Drupal Planet
  • Constraint Plugins
By admin, 27 October, 2025

🧱 Drupal 11.3: Themes Now Support OOP Hooks

🚀 Introduction

Drupal 11.3.0 brings a powerful update for themers and front-end developers:
themes can now implement hooks using Object-Oriented Programming (OOP) with the #[Hook()] attribute — just like modules have been able to do since Drupal 11.

This means no more long procedural functions in template.php.
Instead, you can organize your logic cleanly in classes inside the theme’s src/Hook directory.

Tags

  • #Drupal Planet
  • Drupal 11
  • Themes
  • Hooks
  • OOP
  • PHP Attributes
By admin, 22 October, 2025

🧠 New cache.memory Bin Replaces cache.static — What’s New in Drupal 11.3

Introduced in Drupal 11.3.0, a new standardized in-memory cache bin called cache.memory replaces the old cache.static bin. This change modernizes how Drupal handles in-memory caching, improves performance, and clarifies the intended use of memory-based caches.


🚀 Overview

The new cache.memory bin is powered by the backend
Drupal\Core\Cache\MemoryCache\MemoryCache.

It provides a lightweight and efficient in-memory cache that:

Tags

  • #Drupal Planet
  • cache.memory

Pagination

  • First page
  • Previous page
  • Page 1
  • Page 2
  • Page 3
  • Page 4
  • Page 5
  • Page 6
  • Page 7
  • Page 8
  • Page 9
  • …
  • Next page
  • Last page
Powered by Drupal