Home

>

Tools

>

Drupal

>

Releases

>

8.0.0-beta1

Drupal Release: 8.0.0-beta1

Pre Release

Tag Name: 8.0.0-beta1

Release Date: 10/1/2014

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.0.0-beta1 marks a significant milestone in Drupal 8's development journey, transitioning from alpha to beta status. This release brings substantial improvements to the template system by moving classes from preprocess to templates, enhances accessibility features, introduces a more robust URL handling system, and implements numerous API improvements. The beta release represents a more stable codebase with cleaner architecture, better performance, and improved developer experience as Drupal 8 moves closer to a production-ready state.

Highlight of the Release

    • Template system improvements: Classes moved from preprocess to templates for better theming
    • New URL handling system with Url objects replacing url() and l() functions
    • Enhanced accessibility features throughout the system
    • Improved language handling and interface for translations
    • Robust page cache-policy framework for better performance
    • Support for responsive images with srcset and sizes attributes
    • New EntityDefinitionUpdateManager for controlled schema updates
    • Global menus (primary/secondary links) converted to blocks

Migration Guide

URL System Changes

The URL handling system has been completely overhauled. Replace:

// Old way
$url = url('node/1', ['absolute' => TRUE]);
$link = l('My link', 'node/1', ['attributes' => ['class' => ['my-class']]]);

// New way
use Drupal\Core\Url;
$url = Url::fromRoute('entity.node.canonical', ['node' => 1])->setAbsolute()->toString();
$link = \Drupal::l('My link', Url::fromRoute('entity.node.canonical', ['node' => 1], ['attributes' => ['class' => ['my-class']]]));

For external URLs:

// Old way
$url = url('http://example.com');

// New way
use Drupal\Core\Url;
$url = Url::fromUri('http://example.com')->toString();

Template System Changes

Templates now use the Attribute object for handling HTML attributes:

// Old way in template
<div class="<?php print $classes; ?>">

// New way in template
<div{{ attributes.addClass(classes) }}>

Field API Changes

Field types have been renamed and restructured:

  • FieldInstanceConfig is now FieldConfig
  • list_text field type is now list_string

Entity API Changes

Entity definitions no longer use the 'fieldable' key:

// Old way
$entity_types['node']->set('fieldable', TRUE);

// New way
$entity_types['node']->set('field_ui_base_route', 'entity.node_type.edit_form');

Form API Changes

Form state is no longer using ArrayAccess:

// Old way
$form_state['values']['my_value'];
$form_state['rebuild'] = TRUE;

// New way
$form_state->getValue('my_value');
$form_state->setRebuild();

Deprecated Functions

The following functions have been deprecated:

  • drupal_write_record()
  • format_rss_item() and format_rss_channel()
  • drupal_render_page()
  • form_error()
  • drupal_valid_path()

Use their object-oriented replacements instead.

Upgrade Recommendations

This beta1 release represents a significant step toward a stable Drupal 8 release. While it's more stable than alpha releases, it's still not recommended for production sites.

For Developers:

  • Begin updating custom modules to use the new APIs
  • Test your code against this beta release to identify compatibility issues
  • Pay special attention to URL handling changes, as they affect many parts of the system
  • Review your theme templates to take advantage of the new template system

For Site Builders:

  • Create test sites with this beta to familiarize yourself with the new features
  • Test your existing site's functionality in a separate environment
  • Document any issues you encounter for future migration planning

For Production Sites:

  • Continue using Drupal 7 for production sites
  • Consider setting up a parallel development environment with Drupal 8 beta1 for testing and learning
  • Begin planning your migration strategy, but wait for the final release before migrating production sites

Timeline Expectations:

  • More beta releases will follow to address issues discovered
  • Wait for at least a release candidate before considering production use
  • The full release of Drupal 8.0.0 will be the appropriate time for most sites to begin migration

This beta release is primarily intended for developers to test their code, report bugs, and prepare for the final release.

Bug Fixes

User Interface Fixes

  • Fixed misaligned icons in Drupal 8.x
  • Fixed form required marker "\204E" broken in Google Chrome 35 / Internet Explorer 9
  • Fixed dialog box having white top corners
  • Fixed display settings top having unintentional background
  • Fixed HTML tag visible in permission page
  • Fixed CSS syntax error in Seven theme

Form and Data Handling

  • Fixed Add user page (admin/people/create) remembering values when it should not
  • Fixed class HTML attribute present even when no class is assigned to the list
  • Fixed image alt attribute not being passed in $variables['attributes']
  • Fixed CKEditor creating HTML entities
  • Fixed NumericItemBase using '#type' => 'textfield' for numeric 'min' and 'max' form fields

Multilingual Issues

  • Fixed regression where language names should display in their native names
  • Fixed translations not downloaded when adding a new language
  • Fixed localization update not updating configuration translations
  • Fixed translated taxonomy terms not rendered in the entity display language

Security and Session Management

  • Fixed when operating in mixed mode SSL: data from anonymous non-HTTP session still available after login
  • Fixed cron lock time limit being too short, not preventing multiple concurrent cron runs

Image Handling

  • Fixed do not upscale by default
  • Fixed PHP 5.5 imagerotate() failing when incorrect color indices are passed in
  • Fixed CSS aggregator prepending data: URLs with paths

Migration Issues

  • Fixed d6_taxonomy_term migration failing when parent term has not been already migrated
  • Fixed author information not migrating over
  • Fixed data for fields with multiple values not importing
  • Fixed node_revisions.timestamp not migrating into the revision_timestamp field

Configuration Management

  • Fixed misleading message when there is no configuration to synchronize/import
  • Fixed 'Enable Translation' checkbox default being non-predictable for new bundles

Other Fixes

  • Fixed path aliases no longer being arrays and unable to pass additional data to path hooks
  • Fixed search ranking recency scoring algorithm
  • Fixed update status repeatedly trying to fetch updates for projects without a release
  • Fixed MySQL column and table comments not being truncated properly

New Features

Template System Improvements

Classes have been moved from preprocess functions to templates across many components including:

  • Node templates
  • Block templates
  • User templates
  • Region templates
  • Taxonomy term templates
  • Filter templates
  • RDF templates
  • Update templates
  • Container templates

This provides better separation of concerns and makes theming more straightforward.

New URL Handling System

A complete overhaul of the URL handling system has been implemented:

  • url() and l() functions are now deprecated and renamed to _url() and _l()
  • New Url objects are used instead of string paths
  • \Drupal::url() and \Drupal::l() methods introduced
  • Special route names for <current> and <none>
  • UnroutedUrlAssembler added for external URLs

Enhanced Field System

  • Field types have been improved with better interfaces
  • FieldInstanceConfig renamed to FieldConfig for clarity
  • ThirdPartySettingsInterface implemented in various entities
  • Default image display option added for image fields
  • Field weights are now properly migrated

Language Improvements

  • Language names now display in their native names in language switcher block
  • Link tags to alternate languages (hreflang) added in HTML head
  • Better handling of translated taxonomy terms
  • Improved language configuration during installation

Entity System Enhancements

  • EntityDefinitionUpdateManager added for controlled schema updates
  • Entity displays are now config entities
  • Removal of 'fieldable' key in entity definitions
  • Better support for computed fields
  • User roles converted to entity_reference_field

Views Enhancements

  • Taxonomy listing and feed converted to Views
  • Views rendering moved from template_preprocess to #pre_render callback
  • Aggregator sources and OPML converted to Views
  • Better handling of Views filters and access checking

Security Updates

Session Security

  • Fixed a security issue where data from anonymous non-HTTP session was still available after login when operating in mixed mode SSL

Access Control

  • New AccessResult API and implementation for more secure access checking
  • Support for AND/OR conjunctions for permission checks
  • Improved CSRF protection with route name and params instead of _system_path in CsrfAccessCheck

Form Security

  • Improved form state handling with FormStateInterface::cleanValues()
  • Better validation of form submissions

Email Validation

  • Integration of egulias/EmailValidator for RFC compliant email address validation

Random String Generation

  • Ensured that randomString() always returns a character that needs to be escaped for HTML

Plugin Security

  • Improved plugin validation with better interface checking

Performance Improvements

Caching Improvements

  • Introduction of a robust and extensible page cache-policy framework
  • Cache tags added to tours for better cache invalidation
  • Improved cacheability metadata for access checks

Rendering Optimizations

  • Render->fragment code factored out to a service for better performance
  • Views rendering moved from template_preprocess to #pre_render callback
  • Improved handling of computed fields in iterators

Database and Storage

  • Better handling of database schema updates through EntityDefinitionUpdateManager
  • Improved SQL query handling in various components
  • More efficient handling of field data storage

Resource Management

  • More efficient handling of CSS and JavaScript resources
  • Better management of image scaling and processing
  • Improved handling of file operations in migrations

Session Handling

  • More efficient session management
  • Improved handling of anonymous sessions
  • Better performance for language negotiation

Impact Summary

Drupal 8.0.0-beta1 represents a significant milestone in the development of Drupal 8, marking the transition from alpha to beta status. This release brings substantial architectural improvements and refinements across the entire system.

The most impactful changes include a complete overhaul of the template system, moving classes from preprocess functions to templates for better separation of concerns. This makes theming more straightforward and maintainable. The URL handling system has been completely redesigned, replacing the procedural url() and l() functions with an object-oriented approach using Url objects, providing more flexibility and better API design.

Accessibility has been significantly enhanced throughout the system, with improved markup for pagination, better form elements, and proper use of ARIA attributes. The language system has been refined with better handling of translations and improved configuration options.

For developers, numerous API improvements provide a cleaner, more consistent experience. The entity system has been enhanced with better field handling and the introduction of EntityDefinitionUpdateManager for controlled schema updates. The plugin system now includes a generic fallback mechanism, and many deprecated functions have been removed in favor of more modern approaches.

Performance improvements include a robust page cache-policy framework and better handling of rendering operations. Security has been enhanced with improved access checking and session management.

While this beta release represents a more stable codebase than previous alpha releases, it's still primarily intended for developers to test their code and prepare for the final release. Production sites should continue using Drupal 7 until the full release of Drupal 8.0.0.

Statistics:

File Changed300
Line Additions2,543
Line Deletions1,541
Line Changes4,084
Total Commits250

User Affected:

  • New URL handling system with Url objects replacing url() and l() functions
  • Classes moved from preprocess to templates for better theming
  • New APIs for access checking with AND/OR conjunctions
  • Improved plugin system with fallback mechanism
  • Removal of deprecated functions like drupal_write_record()
  • New EntityDefinitionUpdateManager for controlled schema updates

Contributors:

alexpottjhodgdon-drpwebchickgoba