Home

>

Tools

>

Drupal

>

Releases

>

10.2.0-beta1

Drupal Release: 10.2.0-beta1

Pre Release

Tag Name: 10.2.0-beta1

Release Date: 11/21/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.2.0-beta1 brings significant improvements to the core platform with a focus on developer experience, performance, and UI enhancements. Key updates include Media revision UI, improved AJAX handling, compressed AJAX page state for better performance, and numerous bug fixes. This release also introduces new components like Symfony's Filesystem and Finder, enhances configuration validation, and improves accessibility. The beta represents a substantial step forward with over 5,500 changes across 300 files.

Highlight of the Release

    • Added Media revision UI for version control of media entities
    • Compressed AJAX page state for improved performance
    • Added Symfony's Filesystem and Finder components to core
    • Support for inline HTML comments in CKEditor 5
    • Fixed issues with uninstalled custom themes blocking config import
    • Improved configuration validation with better error handling
    • Enhanced AJAX handling and testing capabilities
    • Fixed default file visibility settings not being respected
    • Improved UI with better button alignment and styling
    • Added deployment identifier display on status page

Migration Guide

Deprecated APIs

CacheDecoratorInterface

The unused CacheDecoratorInterface has been deprecated. If you're implementing or extending this interface, you should plan to update your code in future releases.

path.temporary Configuration

The path.temporary in system.file configuration schema has been deprecated. Update any code that relies on this configuration to use the appropriate alternatives.

FormStateInterface::setErrorByName()

The behavior of FormStateInterface::setErrorByName() has been updated to not use #name but a variation. If you're using this method in custom code, ensure it aligns with the new implementation.

New Components

Symfony's Filesystem and Finder

If you're using custom file handling code, consider migrating to the newly available Symfony Filesystem and Finder components for more robust and standardized file operations.

Testing Changes

AJAX Testing

The new ::assertExpectedAjaxRequest() method has been added to stabilize FunctionalJavascript testing for AJAX. Update your tests to use this method for more reliable AJAX testing.

Test Class Changes

Several test classes have been updated or renamed for better discoverability. For example, EntityReferenceTestTrait has been renamed. If you're extending these tests, you'll need to update your references.

Upgrade Recommendations

Recommendation Level

This is a beta release and is not recommended for production sites. It's intended for testing and development purposes to identify any issues before the stable release.

Who Should Upgrade

  • Developers and module maintainers should test their custom modules and themes against this beta to ensure compatibility with the upcoming 10.2.0 stable release.
  • Site builders with development or staging environments should consider testing this release to identify any potential issues with their specific site configurations.
  • Production sites should wait for the stable 10.2.0 release before upgrading.

Preparation Steps

  1. Create a complete backup of your site, including files and database.
  2. Test the upgrade on a staging environment first.
  3. Review the list of deprecated APIs and plan for any necessary code updates.
  4. Check compatibility of contributed modules with this beta release.
  5. Pay special attention to custom code that interacts with the configuration system, AJAX functionality, or file handling, as these areas have seen significant changes.

Post-Upgrade Actions

  1. Clear caches thoroughly after upgrading.
  2. Run update.php to ensure all database updates are applied.
  3. Test all critical site functionality, especially forms with AJAX elements and media handling.
  4. Review logs for any new warnings or errors that might indicate compatibility issues.

Bug Fixes

Fixed Uninstalled Custom Theme Issue

Resolved an issue where uninstalled custom themes could get stuck in configuration, blocking config import operations.

Default File Visibility Setting

Fixed a long-standing issue where the default file visibility setting was not being respected when uploading files.

Race Condition in AJAX Forms

Addressed a race condition between AJAX change events and form submission that could lead to unexpected behavior.

Entity Autocomplete with "0" Label

Fixed an issue where entity autocomplete form elements would ignore entities with the label "0".

Language Switcher on Frontpage

Resolved a regression where language switcher blocks would return links to nodes on the frontpage instead of the correct frontpage URL.

Button Alignment

Fixed misalignment issues between dropbuttons and regular buttons for better UI consistency.

Text Color on Button Hover

Corrected an issue where text color would change on hover for <a> elements with the .buttons class.

Layout Breaking with Long Strings

Fixed an issue where long strings would break the layout of the Claro theme.

AttributeClassDiscovery Failure

Resolved an issue where AttributeClassDiscovery would fail while trying to include non-valid plugin classes.

RSS Feed Empty srcset Attribute

Fixed a warning that occurred when RSS feeds included markup with an empty srcset attribute.

New Features

Media Revision UI

A significant addition in this release is the Media revision UI, which brings version control capabilities to media entities. This feature allows content editors to track changes, revert to previous versions, and maintain a history of media assets.

Symfony's Filesystem and Finder Components

Core now includes Symfony's Filesystem and Finder components, providing developers with powerful tools for file system operations and file searching capabilities.

Inline HTML Comments in CKEditor 5

CKEditor 5 now supports inline HTML comments, enhancing the content editing experience by allowing editors to leave notes and comments within the content that won't be displayed on the frontend.

Deployment Identifier on Status Page

The deployment identifier is now displayed on the status page, making it easier for administrators to track and verify deployments across environments.

Announcements Feed

The Announcements Feed module has been marked as stable and added to the Standard profile, providing site administrators with important Drupal news and updates directly in their admin interface.

Improved Configuration Validation

Enhanced configuration validation with better error handling, including support for non-1:1 form element-to-config property mapping in ConfigFormBase with validation constraints.

Security Updates

Version Information Disclosure

Removed Drupal core version information from install.php when the site is already installed, preventing potential information disclosure that could be used by attackers to target known vulnerabilities in specific versions.

Performance Improvements

Compressed AJAX Page State

A significant performance improvement has been implemented by compressing the AJAX page state. This reduces the amount of data transferred during AJAX requests, leading to faster response times and reduced bandwidth usage.

Lazy Services for Cache Contexts

Both BookNavigationCacheContext and MenuActiveTrailsCacheContext have been converted to use lazy services, improving performance by only instantiating these services when needed.

Improved Library Dependency Resolution

Fixed an issue in LibraryDependencyResolver::getMinimalRepresentativeSubset() which was calculating dependencies incorrectly, leading to potential performance issues.

Demoted Routine Log Events

Routine log events have been demoted from "notice" to "info" level, reducing log noise and improving log performance and readability.

Impact Summary

Drupal 10.2.0-beta1 represents a substantial evolution of the platform with over 5,500 changes across 300 files. The release focuses on enhancing developer experience, improving performance, and refining the user interface.

For developers, the addition of Symfony's Filesystem and Finder components provides powerful new tools for file operations. The improved configuration validation system and enhanced AJAX testing capabilities will lead to more robust code and easier debugging. Several deprecated APIs signal future changes that developers should prepare for.

Site builders benefit from the new Media revision UI, which brings much-needed version control to media entities. The fix for uninstalled custom themes blocking config import resolves a frustrating issue that has affected many sites. The addition of the Announcements Feed to the Standard profile improves the out-of-the-box experience.

Content editors will appreciate the support for inline HTML comments in CKEditor 5 and the improved entity autocomplete that now properly handles entities with label "0". The Media revision UI gives them better control over media assets.

Performance improvements, particularly the compressed AJAX page state, will benefit all users with faster page loads and reduced bandwidth usage. UI enhancements like fixed button alignment and better handling of long strings in the Claro theme improve the overall user experience.

While this beta release introduces many valuable improvements, it should be thoroughly tested in non-production environments before the stable release is adopted for production sites.

Statistics:

File Changed300
Line Additions3,735
Line Deletions1,854
Line Changes5,589
Total Commits110

User Affected:

  • Access to Symfony's Filesystem and Finder components for better file handling
  • Improved configuration validation with better error handling
  • Enhanced AJAX handling with new assertExpectedAjaxRequest() method for testing
  • Better form handling with improved FormStateInterface::setErrorByName()
  • Deprecated CacheDecoratorInterface and path.temporary in system.file configuration

Contributors:

alexpottlongwavelauriiixjmlarowlan