Skip to main content
Home
Drupal life hacks

Main navigation

  • Drupal
  • React
  • WP
  • Contact
  • About
User account menu
  • Log in
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
By admin, 17 October, 2025

Drupal 11.3 Deprecates template_preprocess_HOOK and file/includes in hook_theme(). What Developers Need to Change

Drupal 11.3 introduces an important shift for theme and module developers:
the long-standing automatic discovery of template_preprocess_HOOK() functions is now deprecated, along with the file and includes keys in hook_theme().

These patterns have been around since Drupal 7 and worked well in the procedural era. But with modern autoloading and class-based preprocessors, they’re no longer necessary — and now officially discouraged.

In this article, we’ll cover:

Tags

  • #Drupal Planet
  • Drupal preprocess callbacks
By admin, 16 October, 2025

How to Change the Browser URL Without Reloading the Page in Drupal 11 Using SetBrowserUrl

Drupal 11.3.0 introduced a long-awaited feature that brings AJAX behavior to a new level — the Views module can now update the browser URL without reloading the page. This is made possible thanks to the new AJAX command SetBrowserUrl.


Why This Matters

Previously, AJAX-powered Views had one major UX issue: after filtering, sorting, or pagination, the page URL remained unchanged. This led to several problems:

Tags

  • #Drupal Planet
  • SetBrowserUrl
By admin, 15 October, 2025

Drupal 11.3: Simplifying Plugin Development with Autowired create() in PluginBase

Drupal has always been flexible when it comes to plugins, but dependency injection in plugins has historically required boilerplate code. In Drupal 11.3, the PluginBase class introduces a game-changing feature: a generic create() factory method with autowired parameters. This update simplifies plugin development and reduces repetitive code.

Tags

  • #Drupal Planet
  • Plugin Development
  • PluginBase

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