Home

>

Tools

>

Drupal

>

Releases

>

8.0.0-beta3

Drupal Release: 8.0.0-beta3

Pre Release

Tag Name: 8.0.0-beta3

Release Date: 11/11/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-beta3 brings significant improvements to the development experience with numerous bug fixes, performance enhancements, and API refinements. This release focuses on cleaning up deprecated code, improving security, enhancing theme templates, and refining the migration system. Key changes include updating to Guzzle 5, improving configuration entity dependencies, and moving template classes from preprocess to templates for better theming flexibility. This beta represents continued progress toward a stable Drupal 8 release with better developer tools and improved user experience.

Highlight of the Release

    • Updated to Guzzle 5 for improved HTTP client capabilities
    • Added hook_page_attachments(_alter)() and deprecated hook_page_build/alter()
    • Improved security with better protection for YAML files using .htaccess and web.config
    • Enhanced configuration entity dependency system with content dependencies
    • Moved many template classes from preprocess to templates for better theming
    • Migrated more templates to Classy theme (aggregator, user, search, rdf, taxonomy, file)
    • Improved language handling for translations and browser language detection
    • Enhanced migration system with support for Drupal 6 menu links and variables
    • Removed many deprecated functions in favor of more modern alternatives
    • Fixed numerous bugs in Views, language negotiation, and theme system

Migration Guide

Deprecated API Removals

If your code uses any of the following deprecated functions, you'll need to update to their replacements:

  • Replace drupal_get_settings with Settings::get()
  • Replace drupal_html_to_text() with Html::decodeEntities()
  • Replace drupal_strlen() with mb_strlen()
  • Replace drupal_substr() with mb_substr()
  • Replace drupal_strtolower() with mb_strtolower()
  • Replace drupal_strtoupper() with mb_strtoupper()
  • Replace drupal_ucfirst() with mb_strtoupper(mb_substr($string, 0, 1)) . mb_substr($string, 1)
  • Replace truncate_utf8() with Unicode::truncate()
  • Replace decode_entities() with Html::decodeEntities()
  • Replace mime_header_encode() with PHP's mb_encode_mimeheader()
  • Replace drupal_convert_to_utf8() with Unicode::convertToUtf8()
  • Replace drupal_var_export() with PHP's native var_export()

Hook Changes

  • Replace hook_page_build() and hook_page_alter() with hook_page_attachments() and hook_page_attachments_alter()
  • Form API: form_set_value() has been removed, use $form_state->setValueForElement() instead
  • Form API: form_execute_handlers() has been removed, use the Form API directly
  • Form API: form_get_cache() has been removed, use Form API methods instead

Entity API Changes

  • Replace direct entity loading with static method calls:
    • node_load()Node::load()
    • node_load_multiple()Node::loadMultiple()
    • entity_load('node')Node::load()
    • entity_load_multiple('node')Node::loadMultiple()
    • contact_form_load()ContactForm::load()
    • entity_load('contact_form')ContactForm::load()
    • entity_load_multiple('contact_form')ContactForm::loadMultiple()

Theme System Changes

  • Classes have been moved from preprocess functions to templates for tables, links, and comments
  • Many templates have been moved to the Classy theme
  • File icons now use CSS instead of images in file fields
  • drupal_render() second argument has been inverted from $is_recursive_call to $is_root_call for stricter rendering

Plugin System Changes

  • PluginBag has been renamed to LazyPluginCollection
  • WidgetFactory has been removed as it was not used anywhere
  • Support for "reference a specific revision" has been removed

Other API Changes

  • Url class now has a __toString() magic method
  • getCacheTag() has been renamed to getCacheTags()
  • The _http_statuscode request attribute has been removed
  • NestedArray::mergeDeepArray() now preserves integer keys

Upgrade Recommendations

This release (8.0.0-beta3) is a development milestone and not recommended for production sites. It's primarily intended for:

  1. Module developers who need to update their modules to work with the latest Drupal 8 APIs
  2. Theme developers who want to test the new theming system and Classy base theme
  3. Site builders who want to experiment with Drupal 8 features and provide feedback
  4. Contributors who want to help identify and fix bugs before the final release

If you're already running a previous Drupal 8 beta, upgrading to beta3 is recommended to test your custom code against the latest API changes. Be aware that there are still breaking changes happening between beta releases.

For production sites, continuing to use Drupal 7 is recommended until Drupal 8.0.0 stable is released.

Testing Recommendations

When testing this beta release, focus on:

  1. Testing modules that use any of the deprecated functions that have been removed
  2. Verifying theme templates work correctly with the new class handling
  3. Testing multilingual functionality, especially language detection and translation
  4. Checking Views functionality, particularly with arguments and filters
  5. Testing migration paths from Drupal 6/7 if you're planning a future migration

Remember to back up your site before upgrading to this beta version, as downgrading may not be possible due to database schema changes.

Bug Fixes

Core System Fixes

  • Language Negotiation: Fixed issues where enabling and configuring content language negotiation didn't work at once.
  • Session Management: Fixed session_manager to allow proper overriding.
  • Key-Value Database: Fixed bug when deleting nothing from Key-Value database.
  • Configuration Storage: Fixed issue preventing contrib modules from providing config storage.
  • Installer Requirements: Fixed HTML escaping in installer requirements error messages.

Views and UI Fixes

  • Views Arguments: Fixed issues with Views arguments not working on front-end.
  • Feed Icons: Fixed missing feed icons in views blocks and pages.
  • Grouped Filters: Fixed remove link in views UI grouped filters.
  • View Duplication: Fixed bug where duplicate view copies retained the old view name.
  • Views Field Rendering: Improved performance by caching entity display objects.

Theme and Display Fixes

  • RTL Support: Fixed several RTL issues in shortcut module and Seven theme tabs.
  • Status Messages: Fixed misaligned status messages.
  • Bartik Dropbutton: Fixed styling issues with Bartik dropbutton.
  • Menu Label Overlap: Fixed menu label overlapping with dropdown trigger on narrow screens in RTL.
  • Views List Alignment: Fixed vertical alignment of texts in Views list.

Entity and Field Fixes

  • Entity Reference: Fixed cleanup of EntityReferenceController's create() method and removed references to non-existent exception class.
  • Field Data Loss: Fixed field_has_data to look at revisioning data instead of current data to prevent data loss.
  • Field Schema: Fixed incorrect Entity Reference field schema.

Form and Menu Fixes

  • Contact Form: Fixed default contact form not sending email as recipient was not set during installation.
  • Content Type Form: Fixed "Don't display post information" always displaying on content type edit form.
  • Menu UI CSS: Fixed menu_ui CSS file not loading.

File and Translation Fixes

  • Private Files: Fixed broken downloads for translated private files.
  • Translation Settings: Fixed issue with translation settings not remembering "needs updating" status when editing outdated translations.
  • CSS Aggregation: Fixed CSS aggregation breaking URLs with query strings.

New Features

API Improvements

  • hook_page_attachments(_alter)(): Added new hooks to replace the deprecated hook_page_build/alter() for better page rendering control.
  • Entity/Field Schema Changes: Added support for code to respond to entity and field schema changes.
  • Attribute Object Methods: Added methods for adding/removing attributes (not just classes) on Attribute objects, including a hasClass() method.
  • Configuration Entity Dependencies: Enhanced the dependency system to track content dependencies in configuration entities.
  • Third Party Settings: Added getThirdPartySettings() method to ThirdPartySettingsTraitInterface.

Theme System Enhancements

  • Template Classes: Moved classes from preprocess to templates for tables, links, and comments for better theming flexibility.
  • Classy Theme Templates: Added more templates to Classy theme including:
    • Aggregator templates
    • User templates
    • Search templates
    • RDF templates
    • Taxonomy templates
    • File templates
  • CSS File Icons: Replaced image-based file icons with CSS-based icons in file fields.

Migration System

  • Drupal 6 Menu Links: Added support for migrating Drupal 6 menu links.
  • Additional Variables: Added migration support for several Drupal 6 variables:
    • update_check_frequency
    • allow_insecure_uploads
    • page_compression
    • feed_item_length
    • default_nodes_main
    • forum_nav_vocabulary

Language System

  • Browser Language Mappings: Added user interface for browser language mappings, improving language detection for Chinese and other languages.
  • Localized Language Selectors: Language selectors now show localized to the page language.

Security Updates

Security Enhancements

  • YAML File Protection: Added protection for YAML files using .htaccess and web.config to prevent direct access to configuration files.
  • Route Access Checks: Replaced AccessRouteSubscriber with built-in checks to avoid depending on event subscribers for security.
  • Anonymous User Redirection: Improved security by redirecting anonymous users to login page from an exception listener instead of in MaintenanceModeSubscriber.
  • Views Security: Addressed SA-CONTRIB-2013-035 for views in Drupal 8, fixing potential security vulnerabilities.
  • MySQL Security: Raised MySQL requirement to 5.1.21 which includes security improvements.
  • robots.txt: Updated robots.txt to allow Google access to CSS and JavaScript files, improving SEO while maintaining security.

Security API Improvements

  • Exception Handling: Improved 403/404 exception HTML subscriber by using the routing system instead of duplicating the page render pipeline.
  • Controller Security: Fixed _content controllers to only return render arrays, not strings, improving security of rendered output.

Performance Improvements

Caching and Performance

  • Views Field Rendering: Improved performance by caching entity display objects in views field rendering.
  • ElementInfoManager: Fixed ElementInfoManager::buildInfo() which was processing info data on every request, causing unnecessary overhead.
  • Shortcut Performance: Fixed performance issue where shortcut module was unnecessarily rerunning routing.

Database Improvements

  • MySQL Requirements: Raised MySQL requirement to 5.1.21 to support caching of prepared statements, which improves database performance.
  • Transaction Handling: Fixed inconsistency in rollback and pushTransaction methods for better database transaction performance.

Asset Handling

  • CSS and JS Optimization: Tidied up css.gzip and js.gzip configuration for better asset compression.
  • CSS Aggregation: Fixed issue with CSS aggregation breaking URLs with query strings, improving front-end performance.

Code Optimization

  • Dead Code Removal: Removed several pieces of dead code including:

    • AjaxEnhancer
    • drupal_page_header() and drupal_send_headers()
    • Unused code in contact.install
    • Unused code in FormBuilder
  • Service Optimization:

    • Moved retrieval of visible blocks to a standalone service for better performance
    • Merged AjaxResponseRenderer into AjaxController to reduce service overhead

Impact Summary

Drupal 8.0.0-beta3 represents a significant step forward in the Drupal 8 development cycle, focusing on code cleanup, API refinements, and bug fixes. This release improves developer experience by removing deprecated functions, enhancing theme templates, and providing better tools for configuration management.

Key impacts include:

  1. Developer Experience: The removal of numerous deprecated functions forces developers to use modern alternatives, resulting in cleaner, more maintainable code. The update to Guzzle 5 provides better HTTP client capabilities, and new hooks like hook_page_attachments() offer improved page rendering control.

  2. Theming System: Moving classes from preprocess functions to templates and migrating more templates to the Classy theme creates a more flexible, maintainable theming system. Theme developers now have better tools for managing attributes and working with RTL languages.

  3. Configuration Management: Improvements to configuration entity dependencies, including content dependencies, make the configuration system more robust and reliable. This helps prevent configuration import/export issues that could lead to data loss.

  4. Security: Enhanced protection for YAML files and improvements to route access checks strengthen Drupal's security posture. The move away from event subscribers for security checks represents a more robust approach to access control.

  5. Migration Path: Additional support for Drupal 6 variables and menu links improves the migration path for older sites, making it easier to upgrade to Drupal 8 when it's stable.

While this beta release still has known issues and is not recommended for production sites, it demonstrates Drupal 8's continued evolution toward a stable, feature-rich platform with significant improvements over Drupal 7 in terms of flexibility, performance, and developer experience.

Statistics:

File Changed300
Line Additions3,622
Line Deletions2,682
Line Changes6,304
Total Commits226

User Affected:

  • Updated to Guzzle 5 for improved HTTP client capabilities
  • New hook_page_attachments(_alter)() replacing hook_page_build/alter()
  • Removal of deprecated functions like drupal_get_settings, drupal_substr, drupal_html_to_text
  • Improved API for responding to entity/field schema changes
  • Better configuration entity dependency management
  • Cleaner theme templates with classes moved from preprocess to templates

Contributors:

alexpottjhodgdon-drpwebchickdbuytaert