Home

>

Tools

>

Drupal

>

Releases

>

8.5.0-alpha1

Drupal Release: 8.5.0-alpha1

Pre Release

Tag Name: 8.5.0-alpha1

Release Date: 1/18/2018

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 8.5.0-alpha1 introduces significant enhancements including stable Media module support, Layout Builder, Content Moderation, and PHP 7.2 compatibility. This release brings improved multilingual revision handling, better REST API support, and numerous JavaScript coding standard updates. It also includes important bug fixes for entity handling, configuration management, and accessibility improvements. This alpha release represents a major step forward in Drupal's content management capabilities while maintaining backward compatibility.

Highlight of the Release

    • Media module is now stable, providing robust media management capabilities
    • Layout Builder (experimental) introduces a powerful visual layout system
    • Content Moderation (experimental) enables workflow control for content publishing
    • PHP 7.2 compatibility ensures forward compatibility
    • Improved multilingual revision handling reduces data loss risks
    • Enhanced REST API with better field handling and caching
    • New Messenger service replaces drupal_set_message()
    • Migration system improvements with better documentation and stability

Migration Guide

Messenger Service

The drupal_set_message() function is now deprecated in favor of the new Messenger service:

// Old way
drupal_set_message('My message', 'status');

// New way
\Drupal::messenger()->addStatus('My message');

// Or in a class with dependency injection
$this->messenger->addStatus('My message');

Available methods include:

  • addStatus() - For status messages
  • addWarning() - For warning messages
  • addError() - For error messages

Entity API Changes

Several important changes to the Entity API require attention:

  1. New revision handling methods:

    // Check if entity is latest revision
    $moderation_info->isLatestRevision($entity);
    
    // Check if entity is default revision
    $moderation_info->isDefaultRevision($entity);
    
  2. For multilingual content, use the new API methods to properly handle revisions:

    $entity = $storage->createRevision($entity, $is_default);
    

JavaScript Coding Standards

JavaScript files have been updated to follow new coding standards:

  1. camelCase is now required for variable and function names
  2. Certain syntax patterns are now restricted

Update your custom JavaScript to follow these patterns to maintain consistency.

PHP 7.2 Compatibility

If you maintain custom modules:

  1. Replace assert() calls with proper validation
  2. Ensure all countable variables implement Countable interface
  3. Update any incompatible method declarations

Upgrade Recommendations

Recommendation

This is an alpha release and is not recommended for production sites. It should only be used for testing and development purposes to identify potential issues before the stable release.

For developers and site builders who want to test the new features:

  1. Set up a separate development or staging environment
  2. Make a complete backup of your site before upgrading
  3. Test thoroughly, especially if you use custom modules or have complex multilingual setups
  4. Report any issues to the Drupal issue queue

When upgrading from 8.4.x:

  1. Update to the latest 8.4.x release first
  2. Check for deprecated code in custom modules
  3. Test the Media module integration if you were using the contributed Media module
  4. Review JavaScript for compatibility with new coding standards

The stable 8.5.0 release is expected to follow this alpha release after beta and RC phases, at which point a full upgrade to production sites would be appropriate.

Bug Fixes

Entity Handling

  • Fixed issue where setting a new revision ID on an entity incorrectly set the newRevision flag to false
  • Resolved data loss issue when concurrently editing two translations of a node
  • Fixed EntityResource::patch() making incorrect assumptions about entity keys
  • Corrected handling of entity field values in Views result assertions
  • Fixed issue with manually setting ID field for newly-created content entities

Configuration Management

  • Fixed ConfigEntityInterface::onDependencyRemoval() being called with incorrect dependency list
  • Resolved issue where config sync would throw a warning when not being writable
  • Fixed theme suggestions not being found in theme include files

Form System

  • Fixed duplicate AJAX wrapper around file fields
  • Corrected handling of file upload limit exceeded - file widget no longer disappears
  • Added option to disable inline form errors for a complete form
  • Fixed issue with link widget where help text was not showing

Multilingual

  • Fixed site name not being saved when installing in a language besides English
  • Corrected UTF-8 encoding in email headers for site name
  • Fixed format_plural() not handling D7 translations with a plural form after @count

REST API

  • Fixed normalization of File entities to properly expose file URL
  • Corrected REST test coverage for XML GET requests
  • Fixed caching issues with REST responses

JavaScript

  • Fixed various JavaScript coding standard issues
  • Corrected documentation in ajax.es6.js

Other

  • Fixed issue where preview of content caused "Undefined offset: 0" notice
  • Corrected handling of theme suggestions in theme include files
  • Fixed recursive rebuild caused by installing admin_toolbar_tools module
  • Resolved issue with datetime Views plugins not supporting timezones

New Features

Media Module Now Stable

The Media module is now stable and included in core, providing a robust system for managing media assets. Key features include:

  • Support for various media types including image, document, video, and audio
  • Dedicated media library for organizing and reusing media assets
  • Ability to embed media in content
  • Contextual links for media entities
  • Per-media type creation permissions
  • Automatic extraction of metadata like MIME type and file size

Layout Builder (Experimental)

A new experimental Layout Builder module provides a powerful visual layout system:

  • Create layouts for content types, customize individual pages
  • Context-aware blocks and layouts
  • Visual interface for arranging page elements
  • Field blocks to display entity fields

Content Moderation (Experimental)

Content Moderation is now available as an experimental module:

  • Define publishing workflows with custom states
  • Control content transitions between draft, published, and archived states
  • Views integration with dedicated filters for moderation states
  • API for programmatically working with moderation states

Improved Multilingual Support

  • Better handling of multilingual revisions to prevent data loss
  • Enhanced API for creating new revisions with proper translation handling
  • Improved translation UI and workflow

New Messenger Service

  • New \Drupal\Core\Messenger\Messenger service replaces drupal_set_message()
  • Better organized status, warning, and error messages
  • Improved API for message handling

Migration System Improvements

  • Migration system marked as stable
  • Better documentation for migration plugins
  • Support for handling ID conflicts during upgrades
  • Improved UI for migration with better error handling

Security Updates

REST API Security

  • Improved security for REST PATCH operations by avoiding timing attacks during entity validation
  • Better handling of REST content-type headers for improved security
  • Enhanced access control for REST resources

Media Module Security

  • Added proper access control handler for Media Types
  • Implemented per-media type creation permissions

Other Security Improvements

  • Fixed potential information disclosure issues
  • Improved validation for media type machine names
  • Enhanced security for configuration entities

Performance Improvements

REST API Performance

  • REST responses are now cacheable by Dynamic Page Cache, improving performance for REST API consumers
  • Better handling of cacheability metadata in REST responses
  • Improved field handling in REST responses reduces unnecessary processing

Entity Loading Optimization

  • Added support for loading multiple revisions at once, reducing database queries
  • Optimized entity field handling with ComputedFieldItemListTrait for path field type
  • Improved handling of term parents and children computation to avoid unnecessary processing

Configuration System

  • More efficient handling of configuration dependencies
  • Optimized configuration schema validation

Testing Performance

  • Improved PHPUnit test performance with better mocking support
  • Added support for separate Mink driver settings for JavaScript tests
  • Updated testing dependencies for better performance

Impact Summary

Drupal 8.5.0-alpha1 represents a significant step forward in Drupal's evolution with several major new features and improvements. The stable Media module brings robust media management capabilities directly into core, allowing for better handling of images, documents, videos, and audio files. This addresses a long-standing need in the Drupal ecosystem and eliminates the requirement for contributed modules to handle these common use cases.

The experimental Layout Builder introduces a powerful visual layout system that will eventually transform how Drupal sites are built, making it more accessible to non-technical users while maintaining the flexibility developers need. Similarly, the Content Moderation system provides sophisticated workflow capabilities that are essential for enterprise content management.

Under the hood, this release includes substantial improvements to the entity and revision systems, particularly for multilingual sites, reducing the risk of data loss and improving the developer experience. The REST API enhancements make Drupal a more powerful platform for decoupled applications.

PHP 7.2 compatibility ensures Drupal remains current with modern PHP development practices and security standards. The new Messenger service represents an important step in modernizing Drupal's API and improving code quality.

For site builders and content editors, this release brings significant usability improvements, while developers will appreciate the more consistent APIs and better documentation. The migration system improvements also make it easier to upgrade from older versions of Drupal.

As an alpha release, this version is not yet ready for production use, but it provides a clear view of the exciting features coming in Drupal 8.5.0.

Statistics:

File Changed300
Line Additions2,657
Line Deletions2,383
Line Changes5,040
Total Commits250

User Affected:

  • Benefit from stable Media module support for managing images, documents, videos and audio files
  • Can use Content Moderation workflows to control content publishing states
  • Experience improved handling of multilingual content revisions
  • Better file upload error handling with clearer messages

Contributors:

xjmlarowlanalexpottwebchickgobaeffulgentsia