Drupal Release: 5.0

Tag Name: 5.0

Release Date: 1/15/2007

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 5.0 represents a major upgrade from version 4.7.11, introducing significant improvements in performance, usability, and functionality. This release includes a new CSS preprocessor that can improve page load times by up to 40%, enhanced theming capabilities with the new Garland theme, improved form handling, better MySQL compatibility, and numerous bug fixes and documentation improvements. The update focuses on making Drupal more user-friendly while maintaining its powerful content management capabilities.

Highlight of the Release

    • New CSS preprocessor that caches and compresses CSS files, improving page load times by up to 40%
    • Introduction of the Garland theme with color module for easy customization
    • Improved MySQL compatibility, including support for strict mode
    • Enhanced Form API with better handling of multistep forms and previews
    • Upgraded to jQuery 1.0.4
    • Better multilingual support and translation capabilities
    • Improved comment system with better threading and navigation
    • Support for OpenDocument file extensions by default

Migration Guide

Preparing for Upgrade

  1. Backup Your Site

    • Create a complete backup of your database
    • Backup all files, especially any customized themes or modules
  2. Check Requirements

    • Drupal 5.0 requires MySQL 4.0 or higher (MySQL 3.23 is no longer supported)
    • Ensure your PHP version is compatible
  3. Module Compatibility

    • Check if your contributed modules have Drupal 5.x versions
    • Disable modules that don't have 5.x versions before upgrading
  4. Theme Compatibility

    • Themes from 4.7.x may need updates to work with 5.x
    • Consider using the new Garland theme or updating your custom theme

Performing the Upgrade

  1. Put Site in Maintenance Mode

    • Enable "Site offline" in your site configuration
  2. Replace Files

    • Remove all old core files and replace with new 5.0 files
    • Keep your sites directory intact
    • Preserve any custom modules or themes
  3. Run Update Script

    • Navigate to update.php in your browser
    • Follow the instructions to update the database
  4. Clear Caches

    • All caches will be cleared during the update process
    • You may want to manually clear them again after testing

Post-Upgrade Tasks

  1. Test Functionality

    • Check that all critical site functions work correctly
    • Test content creation, user login, and other key features
  2. Update Contributed Modules

    • Install 5.x versions of your contributed modules
    • Configure any new settings they may require
  3. Review New Features

    • Explore the new Garland theme and color module
    • Test the CSS preprocessor performance
    • Review new configuration options
  4. Update Custom Code

    • Update any custom modules to use the new Form API conventions
    • Check for compatibility with the enhanced menu system
    • Review custom themes for compatibility with new CSS handling

Upgrade Recommendations

Recommendation Level: Highly Recommended

Drupal 5.0 represents a significant improvement over 4.7.x in terms of performance, usability, and functionality. The upgrade is strongly recommended for all Drupal 4.7.x sites for the following reasons:

  1. Performance Benefits: The new CSS preprocessor alone can improve page load times by up to 40%, providing immediate performance benefits with no configuration required.

  2. Security Improvements: As with any major version, security fixes and improvements are included that may not be backported to older versions.

  3. MySQL Compatibility: If you're using newer versions of MySQL, especially in strict mode, Drupal 5.0 provides much better compatibility.

  4. User Experience: The new Garland theme and improved form handling provide a better experience for both administrators and end users.

  5. Developer Tools: Enhanced documentation, improved Form API, and better theme system make development more efficient.

Timing Considerations

  • Low-complexity sites: Can upgrade immediately with minimal risk
  • Medium-complexity sites: Plan for testing but should upgrade within 1-3 months
  • High-complexity sites: Should begin testing and planning now, with a target upgrade within 3-6 months

Preparation Steps

  1. Thoroughly test the upgrade on a staging environment before applying to production
  2. Review the full migration guide for detailed steps
  3. Check compatibility of all contributed modules and themes
  4. Allocate time for addressing any custom code that may need updates

The significant performance improvements and bug fixes make this upgrade worthwhile even for sites with complex customizations.

Bug Fixes

MySQL Compatibility

Fixed issues that prevented Drupal from working when MySQL runs in strict mode, improving database compatibility.

HTML Handling

  • Fixed issue where posts were cut off at a lone < character
  • Improved handling of break tags in content
  • Fixed issue with unnecessary <br /> tags being added to empty output
  • Fixed handling of HTML comments in filter_xss()

Form API Fixes

  • Fixed multistep form API argument passing
  • Fixed forms in node preview
  • Fixed issue where form #ids contained spaces
  • Fixed handling of checkboxes/radios group container classes

Comment System

  • Fixed comment de-indenting multiple levels at a time
  • Fixed comment tracking when comment module has been disabled
  • Fixed comment subject being empty when comment only contains HTML tags
  • Improved comment navigation and display

Path and URL Handling

  • Fixed broken request_uri() on some systems
  • Fixed usage of query string on confirm forms
  • Improved URL handling for search results to allow syndication
  • Fixed path aliasing issues

Module-specific Fixes

  • Fixed modules missing .info files wrongly adding empty entries to module page
  • Fixed aggregator categorization form
  • Fixed profile module fields that appear on registration page
  • Fixed image_scale() to not scale to identical sizes

Performance and Security

  • Fixed scanning of hidden files and directories
  • Fixed HTTP 411/406 problem with progress.js
  • Fixed PostgreSQL-specific bugs
  • Improved caching mechanisms for better performance

New Features

CSS Preprocessor

A new CSS preprocessor has been implemented that caches and compresses all CSS files, resulting in up to 40% faster page loads. This significantly improves site performance without requiring any configuration changes.

Garland Theme

The new Garland theme replaces the previous default theme, featuring improved usability, accessibility, and a color module that allows for easy customization of the site's color scheme.

Color Module

A new color module allows administrators to easily customize color schemes for compatible themes (like Garland) without needing CSS knowledge. It includes several pre-defined color schemes and a visual color picker.

OpenDocument Support

OpenDocument file extensions are now supported by default, improving compatibility with open-source office suites.

Enhanced Multilingual Support

Added Brazilian-Portuguese language support and improved the overall translation system with better handling of language-specific content.

Memory Usage Monitoring

Added memory usage checking in the color module to prevent memory exhaustion during theme processing.

Improved User Management

Longer role names are now supported, giving administrators more flexibility in defining user roles with descriptive names.

Files Directory Status Report

Added files directory writability to the status report, helping administrators identify potential permission issues before they cause problems.

Security Updates

Access Control

  • Fixed URL/callback issues in access control system
  • Improved handling of user permissions and access checks
  • Better validation of user input in various forms

File Handling

  • Improved security for file uploads and downloads
  • Better handling of file permissions during installation
  • Enhanced .htaccess security configuration

Input Validation

  • Improved validation of textfield maximum lengths
  • Better handling of HTML filtering in user-generated content
  • Fixed XSS vulnerabilities in various modules

Session Management

  • Improved cookie domain handling to fix login problems and conform to RFC 2109
  • Better session security with pluggable session.inc
  • Enhanced user authentication mechanisms

Database Security

  • Support for MySQL strict mode improves data integrity
  • Better handling of database prefixes, including allowing dots
  • Improved query sanitization

Performance Improvements

CSS Optimization

The new CSS preprocessor caches and compresses all CSS files, resulting in benchmarks showing up to 40% faster page loads. This is a significant performance improvement that benefits all Drupal sites without requiring any configuration changes.

Database Query Optimization

Several database queries have been optimized throughout the codebase:

  • Removed unnecessary 'GROUP BY' clause in thread-building code
  • More efficient query for comment module functionality
  • Small SQL optimizations in various modules
  • Better handling of query rewriting in presence of OR-clauses

Caching Improvements

  • Improved node caching mechanism
  • More efficient static cache usage
  • Better handling of path aliases caching
  • Improved menu caching

JavaScript Optimizations

  • Simplified JavaScript code for collapsed fieldsets
  • Fixed issues with the autocomplete functionality
  • Improved performance of dynamic elements

HTTP Headers and Caching

  • Improved cache headers for static files
  • Better handling of HTTP headers for downloads
  • More efficient session handling

Memory Usage

  • Added memory checks to prevent exhaustion during theme processing
  • More efficient handling of large data sets

Code Optimizations

  • Faster tag parsing by replacing preg_match with strpos where appropriate
  • Performance improvement in user module by replacing ereg with strpos
  • Faster profile field validation using preg_match instead of eregi
  • Minor speed improvements by caching theme functions

Impact Summary

Drupal 5.0 represents a substantial evolution from version 4.7.11, delivering meaningful improvements across performance, usability, and functionality. The most significant impact comes from the new CSS preprocessor, which can reduce page load times by up to 40% through caching and compression of CSS files. This performance boost benefits all sites without requiring configuration changes.

The introduction of the Garland theme with its color module transforms the visual experience and customization capabilities, allowing administrators to easily modify color schemes without CSS knowledge. This makes Drupal more accessible to non-technical users while providing a more polished default appearance.

Database compatibility sees major improvements, particularly with MySQL strict mode support, which removes a significant pain point for many installations. The enhanced Form API provides developers with better tools for creating complex, multi-step forms while fixing numerous edge cases that previously caused issues.

For content editors, improvements to the comment system, better handling of HTML tags, and support for OpenDocument formats enhance the content creation experience. The user management system benefits from longer role names and improved profile handling.

Security and stability improvements are found throughout the codebase, from better session handling to improved input validation. The extensive documentation improvements, including comprehensive PHPdoc comments, make the system more approachable for new developers.

Overall, Drupal 5.0 delivers a more performant, user-friendly, and developer-friendly content management system that maintains backward compatibility while introducing valuable new capabilities. The upgrade path is well-documented, making this a recommended update for all Drupal 4.7.x installations.

Statistics:

File Changed241
Line Additions6,927
Line Deletions9,127
Line Changes16,054
Total Commits250

User Affected:

  • Benefit from improved performance with the new CSS preprocessor
  • Can now use MySQL in strict mode
  • Have access to better user management with longer role names
  • Can monitor site health with new files directory writability status report
  • Improved installation and upgrade process

Contributors:

dbuytaertdrumm