Home

>

Tools

>

Drupal

>

Releases

>

10.1.0

Drupal Release: 10.1.0

Tag Name: 10.1.0

Release Date: 6/22/2023

Drupal LogoDrupal

Highly flexible, open-source content management system known for complex, scalable web applications. Preferred by government, educational, and large enterprise websites requiring advanced customization and security features. Robust module ecosystem.

TL;DR

Drupal 10.1.0 introduces significant enhancements including the new Single Directory Components (SDC) experimental module, improved accessibility features, refactored Claro theme stylesheets, and numerous bug fixes. This release focuses on improving developer experience, user interface refinements, and system stability with over 9,000 changes across 300 files. Key highlights include a new Announcements Feed module, CKEditor 5 improvements, and better media library functionality.

Highlight of the Release

    • Introduction of Single Directory Components (SDC) as a new experimental module for component-based development
    • New Announcements Feed module to keep users informed about Drupal project news
    • Extensive refactoring of Claro theme stylesheets for better maintainability and performance
    • Improved accessibility with better focus management, contrast, and modal dialogs
    • Enhanced CKEditor 5 with support for additional code languages and autoformat
    • Renamed 'Custom Block' terminology to 'Block Content' in the admin UI for better clarity
    • New Twig filters: |add_class, |set_attribute, and |clean_unique_id
    • Updated dependencies including Symfony 6.3, jQuery 3.7.0, and PHPUnit 9.6.7

Migration Guide

Renamed Custom Block to Block Content

The "Custom Block" terminology has been renamed to "Block Content" throughout the admin UI. This affects:

  • Menu items
  • Page titles
  • Form labels
  • Help text

The routes have been updated from admin/structure/block/block-content to admin/content/block. BC redirects have been created for children of changed paths, so existing links should continue to work.

CKEditor 5 Changes

If you were using the "codesnippet" contrib CKEditor 4 plugin, an upgrade path to the "CodeBlock" core CKEditor 5 plugin is now available. The migration will automatically convert your existing configuration.

CSS Updates

Core CSS has been updated to use double-colon for pseudo elements (e.g., ::before instead of :before). If your custom CSS relies on the single-colon syntax, you may need to update it.

JavaScript Updates

  • jQuery has been updated to 3.7.0
  • Node.js 18 is now required for development
  • Several uses of the jQuery ready function have been refactored to use VanillaJS

PHP Updates

  • Symfony has been updated to 6.3
  • PHPUnit has been updated to 9.6.7
  • egulias/email-validator has been updated to v4

API Changes

  • EntityListBuilder::getQuery() has been renamed to something less generic
  • $op operation in hook_node_grants_alter and node_access_grants has been renamed to $operation
  • watchdog_exception() has been deprecated
  • Several methods have improved type hinting and return type declarations

Upgrade Recommendations

This is a minor version update (10.0.x to 10.1.0) that introduces new features and improvements while maintaining backward compatibility with existing APIs. It is recommended to:

  1. Test thoroughly in a development environment before upgrading production sites.

  2. Review your custom and contributed modules for compatibility, especially if they:

    • Use EntityListBuilder::getQuery()
    • Implement hook_node_grants or hook_node_grants_alter()
    • Use watchdog_exception() (now deprecated)
    • Rely on specific CSS selectors with single-colon pseudo-elements
  3. Update your development environment to use Node.js 18 if you're doing theme or JavaScript development.

  4. Check custom CKEditor 5 configurations as there have been several improvements and fixes to the editor.

  5. Review custom block implementations as the terminology has changed from "Custom Block" to "Block Content" and paths have changed from admin/structure/block/block-content to admin/content/block.

  6. Update your automated tests if you're using PHPUnit, as it has been updated to version 9.6.7.

For most sites with standard configurations, this update should be straightforward. The upgrade process follows the standard Drupal minor version update procedure.

Bug Fixes

Media Library Fixes

  • Fixed an issue where it was possible to overflow the number of items allowed in Media Library
  • Fixed pagination issues when inserting media via the media library modal
  • Fixed "is required message" showing while the user has no access to the field

CKEditor 5 Fixes

  • Fixed image resizing to use pixel width instead of percentage width, which was breaking image captions
  • Fixed missing dependency on drupal.ajax
  • Fixed Style plugin configuration tab not appearing

Form and UI Fixes

  • Fixed focus loss on dialog close if the opener is inside a collapsible element
  • Fixed dropbutton quickly showing/hiding its menu on pageload causing layout shift
  • Fixed progress throbber position being incorrect
  • Fixed vertical tab focus on form validation
  • Fixed AJAX state leaking to Views destination paths

Language and Translation Fixes

  • Fixed language negotiator not handling PluginNotFoundException, which could break the site
  • Fixed issues with content translation and contextual links

Database and Performance Fixes

  • Fixed MySQL transactions to use READ COMMITTED by default
  • Fixed inconsistent behavior in fetchAllAssoc() and fetchAllKeyed()
  • Fixed database primary keys exceeding maximum integer storage

Security and Access Fixes

  • Fixed safeguarding against UnblockUser::execute()'s method unblocking the anonymous user
  • Fixed EntityCreateAnyAccessCheck::access() being too restrictive

Other Fixes

  • Fixed broken mail headers in PHP 8.0+ because of LF characters
  • Fixed contextual links not being sorted by weight
  • Fixed "Is not equal to" operator being ignored on exposed, grouped filter
  • Fixed multiple random test failures
  • Fixed issues with entity queries and entity references

New Features

Single Directory Components (SDC)

The new experimental Single Directory Components module allows developers to create self-contained UI components with templates, styles, and behavior in a single directory. This brings component-based development practices to Drupal core, making it easier to create and maintain reusable UI elements.

Announcements Feed Module

A new core module that provides a feed of important Drupal project announcements directly in the admin interface. This helps site administrators stay informed about security updates, new releases, and other important project news.

Enhanced CKEditor 5

  • Added support for additional code languages (like bash and SQL) in the CodeBlock plugin
  • Added support for the autoformat feature, allowing for Markdown-like syntax while typing
  • Improved image handling with better resizing options

New Twig Filters

  • |add_class: Easily add CSS classes to elements
  • |set_attribute: Set attributes on elements
  • |clean_unique_id: Generate clean unique IDs for HTML elements

Improved Developer Tools

  • Easier Twig debugging and render cache disabling for theme development
  • New TrustedCallback attribute for better code safety
  • Configurable path for CSS/JS optimized assets

UI Improvements

  • Renamed 'Custom Block' terminology to 'Block Content' in the admin UI
  • Modal dialogs for entity delete operations
  • Improved media library with better handling of item limits
  • Better focus management in modals and dialogs

Security Updates

  • SA-CORE-2023-005 security update has been included in this release, addressing security vulnerabilities

  • Fixed safeguarding against UnblockUser::execute()'s method unblocking the anonymous user, preventing potential privilege escalation

  • Added phtml files to the list of potentially malicious extensions, improving security when handling file uploads

  • Fixed OEmbedIframeController to return an HTTP response code that cannot be cached by forward proxies when given illegal parameters

  • Improved type safety throughout the codebase with PHPStan fixes and better error handling

  • Added TrustedCallback attribute to improve code safety when using callback functions

Performance Improvements

Database Performance

  • MySQL transactions now use READ COMMITTED by default, which improves performance and reliability for most use cases
  • Fixed database primary keys exceeding maximum integer storage, preventing potential performance degradation

UI Performance

  • Reduced browser reflow when using toolbar user button
  • Reduced reflow on the Home / Back to Site button
  • Fixed dropbutton quickly showing/hiding its menu on pageload causing layout shift
  • Improved toolbar tray rendering to prevent "flickering" resizing of content area

Asset Management

  • Made CSS/JS optimized assets path configurable, allowing for better CDN integration
  • Fixed generated CSS assets with absolute URLs to properly vary by url.site cache context
  • Improved library order asset weights to work properly when a large number of JavaScript files are loaded

Caching Improvements

  • Fixed exposed term filter not being updated when terms are added, deleted, or rearranged (caching issue)
  • Better handling of cache contexts in various components

Code Optimization

  • Extensive refactoring of Claro theme stylesheets for better performance
  • Improved JavaScript code with less reliance on jQuery ready function
  • Better type safety and error handling throughout the codebase

Impact Summary

Drupal 10.1.0 represents a significant enhancement to the Drupal 10 platform with over 9,000 changes across 300 files. This release focuses on improving developer experience, user interface refinements, and system stability.

The introduction of the Single Directory Components (SDC) experimental module marks an important step toward component-based development in Drupal core, allowing developers to create self-contained UI components with templates, styles, and behavior in a single directory.

For site administrators, the new Announcements Feed module provides a direct channel to stay informed about important Drupal project news, while numerous UI improvements enhance the overall administrative experience. The renaming of "Custom Block" to "Block Content" improves terminology clarity throughout the system.

Content editors benefit from enhanced CKEditor 5 capabilities, including support for additional code languages and autoformat features, as well as improved media library functionality and better modal dialogs for entity operations.

Theme developers will appreciate the extensive refactoring of Claro theme stylesheets, new Twig filters for easier template manipulation, and improved tools for debugging and development.

Performance improvements include better database handling with READ COMMITTED transactions by default, reduced UI reflow, and more configurable asset management. Security has been strengthened with the inclusion of SA-CORE-2023-005 and several targeted fixes.

Overall, Drupal 10.1.0 delivers a more polished, accessible, and developer-friendly platform while maintaining backward compatibility with existing APIs.

Statistics:

File Changed300
Line Additions2,073
Line Deletions7,139
Line Changes9,212
Total Commits250

User Affected:

  • Access to the new Single Directory Components (SDC) experimental module for component-based development
  • Improved developer tooling with easier Twig debugging and render cache disabling
  • Updated dependencies including Symfony 6.3, jQuery 3.7.0, and PHPUnit 9.6.7
  • New Twig filters: `|add_class`, `|set_attribute`, and `|clean_unique_id`
  • Better error handling and type safety with PHPStan improvements

Contributors:

bbenjaminlarowlanalexpottlongwavelauriiixjmjustafish