Drupal Release: 7.0-unstable-9
Pre Release
Tag Name: 7.0-unstable-9
Release Date: 9/15/2009
DrupalHighly 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 7.0-unstable-9 brings significant improvements to the admin interface, API enhancements, and performance optimizations. This release introduces translatable fields, a revamped toolbar, improved accessibility features, and a more intuitive content authoring experience. The update also includes major architectural changes like the removal of the function registry, standardized entity loading, and the addition of the File module to core. These changes provide a more robust foundation for developers while making the CMS more user-friendly for content creators and site administrators.
Highlight of the Release
- Added support for translatable fields to Field API
- Removed function registry while keeping class registry for autoloading
- Added File module to core
- Improved administration interface with reorganized sections and categories
- Enhanced accessibility features throughout the system
- Standardized entity loading for nodes, users, taxonomies, files, and comments
- Improved user roles and permissions API
- Added pluggable SMTP/mail framework
- Added drupal_render() cache pattern for improved performance
Migration Guide
Function Registry Removal
If your module relied on the function registry, you'll need to update your code. The class registry remains intact for autoloading.
Class Attribute Changes
The 'class' attribute now uses an array instead of a string. Update your theme functions and templates accordingly:
// Old way
$attributes['class'] = 'my-class another-class';
// New way
$attributes['class'] = array('my-class', 'another-class');
Block API Changes
hook_block_list() has been renamed to hook_block_info() for consistency. Update your block implementations:
// Old way
function mymodule_block_list() {
// ...
}
// New way
function mymodule_block_info() {
// ...
}
Elements API Changes
hook_elements() has been renamed to hook_elements_info() for consistency. Update your form element implementations:
// Old way
function mymodule_elements() {
// ...
}
// New way
function mymodule_elements_info() {
// ...
}
Field API Changes
Several Field API functions have been renamed or moved. Check the documentation for specific changes to field_attach_* functions.
Custom Block Naming
'box' has been renamed to 'custom block' throughout the system. If you referenced the 'box' table directly, update your code to use 'block_custom'.
Upgrade Recommendations
For Site Administrators
This is an unstable development release (7.0-unstable-9) and should not be used on production sites. It's recommended for testing purposes only.
If you're currently running 7.0-unstable-8, you can upgrade to test new features and provide feedback, but be prepared for potential issues.
For Developers
This is a good time to start testing your modules against Drupal 7 to identify compatibility issues. Key areas to focus on:
- Field API changes, especially if you work with custom fields
- Entity loading mechanisms
- Block and filter system changes
- Class attribute handling in themes
Testing Environment
Set up a separate testing environment before attempting to upgrade any site that contains valuable content or configuration.
Module Compatibility
Many contributed modules will not yet be compatible with this development version. Check each module's project page for Drupal 7 compatibility information.
Bug Fixes
Filter System Fixes
- Fixed 'Escape all HTML' filter which was not escaping any HTML
- Fixed filter settings storage and improved API
Menu and Navigation Fixes
- Fixed hierarchy generation in menu_tree_data()
- Fixed broken links in administration interface
- Fixed error when editing roles
- Fixed block titles not being copied when switching to a new theme
Form and Field Fixes
- Fixed bug with formatter settings getting lost when saving a field
- Fixed lost field weights when submitting 'Display fields' screen
- Fixed bug causing decimal places not to be saved in number module
- Fixed bug with autocomplete functionality
- Fixed autocomplete errors from whitespace entry
Performance and Caching Fixes
- Fixed bug causing authoring information to never be updated
- Fixed tracker performance issues
- Fixed block caching form_alter() which was in wrong file post-registry rip
- Fixed bug with language-specific caching
Security Fixes
- Fixed missing validation for hook_user()
- Fixed src attribute for external JavaScript to be HTML-encoded
Other Fixes
- Fixed broken trigger module
- Fixed non-by-reference use of drupal_static()
- Fixed collapsible fieldsets in Garland
- Fixed error with user registration when configured not to use emails
- Fixed menu_get_names() crash
- Fixed trailing commas in JavaScript causing syntax errors in IE
New Features
Translatable Fields
Field API now supports translatable fields, allowing for multilingual content management at the field level.
File Module in Core
The File module has been added to core, providing improved file handling capabilities throughout Drupal.
Maintenance Mode Permission
A new permission has been added to allow specific roles to access the site while it's in maintenance mode.
Pluggable SMTP/Mail Framework
Added a pluggable SMTP/mail framework to make email configuration more flexible.
CDN Integration Support
Added hook_file_alter() to facilitate integration with Content Delivery Networks.
Improved Administration Interface
- Created 'People and permissions' section in configuration
- Added 'Regional and language' section
- Created 'Search and metadata' category
- Added 'Web services' category
- Created 'Content authoring' category
- Added 'System' configuration section
Enhanced Entity API
Standardized, pluggable entity loading for nodes, users, taxonomies, files, and comments.
New Hooks and APIs
- hook_page_build() that runs before hook_page_alter()
- hook_goto_alter() for SSL support
- hook_file_alter() for CDN integration
- Text format API to manipulate formats
- User roles and permission API improvements
Security Updates
Hook_user() Validation
Fixed missing validation for hook_user(), addressing security advisory SA-CORE-2009-001.
HTML Encoding
Fixed src attribute for external JavaScript to ensure it's properly HTML-encoded, preventing potential XSS vulnerabilities.
SSL Support
Made SSL support easier by providing two cookies and hook_goto_alter(), improving secure connections.
Private File Transfers
Fixed incorrect expiration headers with private file transfers, ensuring better security for protected files.
Performance Improvements
Function Registry Removal
Removed the function registry while keeping the class registry intact. This improves development experience while maintaining autoloading capabilities.
Tracker Performance
Significant performance improvements to the tracker module.
Caching Enhancements
- Added drupal_render() cache pattern and started using it for blocks
- Improved performance of field_attach_query() by adding indices
- Fixed and improved the caching code for better performance with language-specific content
Menu Rebuild Optimization
Instead of a full menu rebuild, set a variable indicating it's needed. This speeds up tests by a factor of at least two.
Memory Management
Reset statics after each update to conserve memory and avoid odd bugs.
Database Optimizations
- Removed global placeholder counter to support Views caching
- Moved query_alter() into a preExecute() method for better query handling
- Added support for random ordering in dynamic select queries
Impact Summary
Drupal 7.0-unstable-9 represents a significant step forward in Drupal's evolution with major architectural improvements and user experience enhancements. The addition of translatable fields opens new possibilities for multilingual sites, while the standardized entity loading system provides a more consistent API for developers. The inclusion of the File module in core addresses a long-standing need for better file handling.
For site administrators, the reorganized administration interface with logical categories makes site management more intuitive. Content creators will appreciate the improved editing experience, particularly for summary/body fields.
Developers benefit from numerous API improvements, including better hooks, a more robust database layer with UNION support, and enhanced caching mechanisms. The removal of the function registry while maintaining the class registry for autoloading strikes a balance between performance and developer experience.
Accessibility improvements throughout the system demonstrate Drupal's commitment to being inclusive, with better screen reader support and more semantic markup.
As an unstable development release, this version showcases the direction Drupal 7 is taking, with a focus on improved APIs, better user experience, and enhanced performance. These changes lay the groundwork for a more powerful and flexible content management system.
Statistics:
User Affected:
- Improved administration interface with reorganized sections like 'People and permissions', 'Regional and language', 'Search and metadata', and 'System'
- New toolbar with better organization and descriptive labels
- Option to include non-enabled modules in Update Status
- New permission to access site in maintenance mode
- Ability to configure logs to never be discarded
