Home

>

Tools

>

Drupal

>

Releases

>

8.2.0

Drupal Release: 8.2.0

Tag Name: 8.2.0

Release Date: 10/5/2016

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.2.0 introduces significant improvements to content authoring and site administration with two new experimental modules: Content Moderation and Settings Tray (formerly Outside-In). This release also adds a Date Range field type, CORS support, and numerous performance improvements. It includes important bug fixes for configuration management, entity handling, and migration tools, while enhancing the developer experience with better testing tools and API improvements.

This is a feature release that maintains backward compatibility with 8.1.x while adding new functionality and refinements to the Drupal 8 platform.

Highlight of the Release

    • Introduction of the experimental Content Moderation module for improved content workflow management
    • New experimental Settings Tray (formerly Outside-In) module for in-context block configuration
    • Addition of a Date Range field type with support for start and end dates
    • Opt-in CORS support for REST resources
    • Improved mobile UI for both admin and frontend themes
    • Enhanced site-wide contact forms with redirect options
    • Better performance with YAML handling and caching improvements
    • Significant improvements to migration tools and APIs

Migration Guide

Experimental Modules

The Content Moderation and Settings Tray modules are marked as experimental. This means:

  • They may contain bugs
  • Their APIs may change in future minor releases
  • They should not be used in production environments without careful consideration

REST API Changes

If you're using REST's resource- and verb-specific permissions for EntityResource:

  1. These permissions have been removed but backward compatibility is maintained
  2. Review your permission settings for REST resources
  3. See the documentation for why this change was necessary and how to adapt your code

Deprecated Functions

Several functions have been deprecated in this release:

  • entity_get_bundles() - Use \Drupal\Core\Entity\EntityTypeBundleInfoInterface::getBundleInfo() instead
  • hook_entity_query_alter() - This hook has been removed, update your code to use the appropriate event subscriber

Migration API Changes

If you're using the Migration API:

  1. The highwater field support has been moved to the source plugin
  2. System-of-record APIs have been removed from migrate
  3. Review your custom migration code to ensure compatibility

Testing Framework Changes

If you're writing tests:

  1. Many web tests have been converted to BrowserTestBase
  2. Several testing utilities have been moved to traits
  3. Update your custom tests to use the new testing infrastructure

Upgrade Recommendations

For sites running Drupal 8.1.x:

This is a standard feature update that maintains backward compatibility with Drupal 8.1.x. It is recommended to update to this version to benefit from new features and important bug fixes.

Steps to upgrade:

  1. Back up your site's files and database
  2. Put your site into maintenance mode
  3. Update Drupal core using Composer (recommended) or by replacing the files manually
  4. Run the database updates by visiting /update.php or using Drush: drush updatedb
  5. Clear caches: drush cache-rebuild or via the admin UI
  6. Take your site out of maintenance mode

Special considerations:

  • If you're using REST services, review your permission settings as there have been changes to the permission system for EntityResource
  • The new experimental modules (Content Moderation and Settings Tray) are disabled by default and can be enabled if desired
  • Test thoroughly in a staging environment before deploying to production

For sites running Drupal 7 or earlier:

This release includes improvements to the migration system, but a direct upgrade path from Drupal 7 to Drupal 8.2.0 still requires using the core migration modules. Consult the Drupal 8 Migration Guide for detailed instructions.

Bug Fixes

Entity and Field Handling

  • Fixed an issue where deleting a translation of an entity would delete all file_usage entries for files referenced by the entity
  • Fixed PathItem::delete() which was never running because the path field type is a computed field
  • Fixed an issue where creating a field with the same name as one being purged resulted in data destruction
  • Fixed a bug where non-revisionable translatable fields on revisionable entities didn't translate correctly

Configuration Management

  • Fixed configuration translation synchronization failures
  • Fixed an issue where config directories specified in settings.php weren't being created by the installer

Views and UI

  • Fixed Views field relationships that break when the field name is too long
  • Fixed a bug where boolean default values were not saved in Views
  • Fixed an issue where deleted blocks were not removed from the block list
  • Fixed a bug where comment permalinks were cached incorrectly when multiple pages existed

Performance and Caching

  • Fixed an issue where FormattedDateDiff::$maxAge was never applied to caches
  • Fixed a performance issue with log/watchdog clear when there are lots of data
  • Fixed a bug where derivatives were being created on read-only stream wrappers

REST and API

  • Fixed a regression where plugins extending from classes of uninstalled modules led to fatal errors
  • Fixed an issue where REST's config translation synchronization could fail and break things
  • Fixed a bug where #markup generated by #pre_render callbacks was not processed by ensureMarkupIsSafe()

Migration

  • Fixed migration rollback for view modes, fields, and field instances
  • Fixed an issue where file migrations always copied files, even if they were already copied to the destination
  • Fixed a bug where migrate rollback did not rollback failed items

New Features

Experimental Modules

  • Content Moderation Module: A new experimental module that provides workflow management for content entities. This allows for more sophisticated content workflows with multiple states beyond just published and unpublished.

  • Settings Tray Module (formerly Outside-In): Provides an improved UI for configuring blocks and other site elements directly from the frontend. This module adds an off-canvas dialog for in-context editing.

Core Improvements

  • Date Range Field Type: Added a new field type that supports start and end dates, perfect for events or any content with a duration.

  • CORS Support: Added opt-in Cross-Origin Resource Sharing (CORS) support for REST resources, allowing for better integration with decoupled applications.

  • Contact Form Improvements: Added redirect options to site-wide contact forms, allowing administrators to specify where users should be directed after form submission.

  • YAML Handling: Added a Drupal YAML wrapper that defaults to using the PECL YAML component if available, improving performance.

  • Mobile UI Improvements:

    • Fixed button layout appearance on node add/edit forms for small devices in Bartik theme
    • Optimized Seven theme's select boxes for small screens
    • Fixed toolbar menu scrolling on mobile browsers

Security Updates

Security Improvements

  • Fixed an issue where a valid one-time login link could be leaked by the referer header to 3rd parties, improving login security.

  • Addressed a potential XSS vulnerability by ensuring that FormattableMarkup::placeholderFormat() doesn't result in unsafe replacements.

  • Fixed an issue where #markup generated by #pre_render callbacks was not properly processed by ensureMarkupIsSafe(), preventing potential markup injection.

  • Improved REST resource permissions handling for EntityResource.

Note: This release also includes SA-CORE-2016-004, a security advisory that was addressed in the 8.2.0-rc2 release.

Performance Improvements

YAML Processing

  • Added a Drupal YAML wrapper that defaults to using the PECL YAML component when available, which provides better performance than the PHP implementation.

Caching Improvements

  • Fixed an issue with FormattedDateDiff::$maxAge never being applied to caches, improving cache handling.
  • Improved handling of derivatives on stream wrappers, preventing unnecessary creation on read-only wrappers.

Database Optimization

  • Fixed a performance issue with Log/Watchdog clear operations when there are large amounts of data, significantly improving cleanup operations.

Class Loading

  • Fixed an issue where cached autoloader misses could cause failures when a previously missed class became available, improving class loading performance.

OPcache Usage

  • Implemented a less demanding check to see if OPcache is active, improving performance on systems with OPcache enabled.

Impact Summary

Drupal 8.2.0 represents a significant step forward in Drupal's evolution with a focus on improving the content authoring and site administration experience. The introduction of the experimental Content Moderation module addresses a long-standing need for more sophisticated content workflows in Drupal core, while the Settings Tray module (formerly Outside-In) brings in-context configuration directly to the frontend.

The new Date Range field type fills an important gap in Drupal's field system, making it much easier to create events or any content with start and end dates without requiring additional contributed modules. This, combined with the improved mobile experience in both the admin and frontend themes, makes Drupal 8.2.0 more user-friendly across devices.

For developers, the addition of opt-in CORS support for REST resources is a significant improvement for decoupled Drupal architectures. The numerous API improvements, better testing tools, and enhanced migration capabilities provide a more robust development platform.

Performance improvements, particularly in YAML handling and caching, contribute to a faster overall experience. The large number of bug fixes, especially in entity handling, configuration management, and Views, addresses pain points reported by the community.

While this release maintains backward compatibility with 8.1.x, site owners should pay special attention to the changes in REST permissions and the experimental status of the new modules when planning their upgrade. Overall, Drupal 8.2.0 delivers valuable improvements that benefit all types of Drupal users while maintaining the stability expected of a minor release.

Statistics:

File Changed300
Line Additions2,007
Line Deletions1,583
Line Changes3,590
Total Commits250

User Affected:

  • Can now use the new experimental Content Moderation module to manage content workflow states
  • Benefit from the new Settings Tray module for in-context block configuration
  • Can configure site-wide contact forms with redirect options
  • Will experience improved UI for mobile devices in both admin and frontend themes

Contributors:

xjmalexpottwebchickdbuytaerteffulgentsia