Home

>

Tools

>

Drupal

>

Releases

>

7.12

Drupal Release: 7.12

Tag Name: 7.12

Release Date: 2/1/2012

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 7.12 is a maintenance release that includes numerous bug fixes, documentation improvements, and minor enhancements. This update focuses on improving API documentation, fixing critical issues with database handling, addressing security concerns, and enhancing overall stability. Key improvements include fixes to the theme registry size, PDO exception handling, taxonomy functionality, and AJAX framework. While not introducing major new features, this release significantly improves Drupal 7's reliability and developer experience.

Highlight of the Release

    • Critical fix to Content-Language HTTP header to prevent issues with Drush
    • Fixed PDO exceptions when saving nodes with titles that are too long
    • Resolved theme registry size issues that could exceed MySQL max_allowed_packet()
    • Fixed custom menus not receiving an active trail
    • Improved search module support for multibyte characters
    • Enhanced Return-Path handling when sending emails on both Windows and non-Windows systems
    • Fixed critical bug that prevented tests from properly isolating test environments

Migration Guide

Upgrading to Drupal 7.12

This is a maintenance release with bug fixes and minor improvements. No special migration steps are required when upgrading from Drupal 7.11.

Important Notes for Specific Scenarios:

  1. If you're using custom code that interacts with the taxonomy system:

    • The taxonomy index is now maintained in a node hook rather than a field hook
    • Review any custom code that relies on taxonomy indexing behavior
  2. If you're using custom themes with menu handling:

    • Custom menus now receive an active trail
    • You may need to review custom menu theming if you were working around this issue
  3. If you're using the AJAX framework:

    • Several bugs in the AJAX framework have been fixed
    • Test your AJAX functionality after upgrading
  4. If you're upgrading from Drupal 6:

    • Note that UPGRADE.txt now clarifies that all D6 contrib modules need to be upgraded to their latest D6 versions before the D6->D7 update
  5. If you're using PDO database connections:

    • PDO connection options are now configurable
    • Review your database configuration if you have custom PDO settings

Upgrade Recommendations

Recommendation Level: Moderate Priority

Drupal 7.12 is recommended for all Drupal 7 sites. While it doesn't contain critical security fixes, it does include important bug fixes and performance improvements that enhance overall site stability.

Who should upgrade immediately:

  • Sites experiencing issues with PDO exceptions when saving content with long titles
  • Sites with large theme registries that are hitting MySQL max_allowed_packet() limits
  • Sites using Drush that are experiencing issues with Content-Language HTTP headers
  • Sites with custom menus that need proper active trail functionality
  • Sites experiencing issues with the search functionality for non-Latin characters

Upgrade timing:

  • For most sites, this update can be applied during your next regular maintenance window
  • Test thoroughly in a development environment before upgrading production sites
  • As with any update, make a complete backup of your site before beginning the upgrade process

Technical considerations:

  • This update includes database schema changes (adding indexes to comment uid columns)
  • Some JavaScript files have been modified, so clear your site's cache after upgrading
  • If you've modified core files, review the changes carefully before applying the update

Bug Fixes

Critical Bug Fixes

  • Fixed Content-Language HTTP header to prevent issues with Drush
  • Resolved PDO exception when saving nodes with titles exceeding database column length
  • Fixed theme registry growth issues that could exceed MySQL max_allowed_packet()
  • Prevented tests from deleting main installation's tables when parent::setUp() is not called

User Interface Fixes

  • Fixed PECL uploadprogress bar not appearing
  • Resolved issue where '0' was not displayed as checkbox/radios options
  • Fixed drag and drop functionality for shortcuts
  • Corrected poll module issues with weight and vote counting
  • Fixed node links alignment in Bartik theme for RTL direction

Database and Performance Fixes

  • Fixed taxonomy_get_tree() incorrect depth calculation on multiple parents
  • Resolved issues with field_available_languages() static cache never being cleared
  • Fixed render cache treating empty strings as cache miss
  • Improved performance of token_replace() when no tokens need replacement

Form and AJAX Fixes

  • Fixed submit button 'floating' during AJAX submission
  • Removed eval() from field_ui.js for better security
  • Fixed bugs in drupal.js, ajax.js, and overlay-parent.js when minified
  • Resolved issues with machine-name fields in RTL languages

Other Fixes

  • Fixed timezone selection during installation not being correctly saved
  • Resolved issues with the taxonomy index maintenance
  • Fixed image field 'title' allowing more data than database column size
  • Ensured Return-Path is properly set when sending mail on both Windows and non-Windows systems
  • Fixed search module handling of multibyte characters

New Features

Enhanced API Documentation

Significant improvements to API documentation across multiple modules including:

  • Field API
  • Contextual module
  • Color module
  • Field UI module
  • Aggregator module
  • Block module
  • Contact module
  • Toolbar module

Improved Database Handling

  • Added ability to configure PDO connection options
  • Better handling of NULL comparisons in database queries
  • Fixed SelectQuery::countQuery() to properly handle SQL expressions

Language and Internationalization Enhancements

  • Implemented missing msgctx context in JS translation for feature parity with t()
  • Improved handling of machine-name fields to always be LTR (left-to-right)
  • Better language provider file inclusion for performance optimization

Menu and Navigation Improvements

  • Added custom db_select() 'conditions' parameter for menu_build_tree()
  • Fixed custom menus to properly receive an active trail
  • Improved overlay redirect to include query strings

Security Updates

Security Enhancements

  • Fixed DoS vulnerability against core using a large number of OR search query terms
  • Removed eval() from field_ui.js to prevent potential security issues
  • Created RFC compliant HTML-safe JSON to prevent potential XSS vulnerabilities
  • Improved security check in 'configure' stage for site_name() and site_mail()
  • Fixed hook_requirements() to properly display security warnings

Input Validation

  • Better handling of long node titles to prevent database exceptions
  • Improved validation for image field 'title' to match database column size
  • Fixed handling of paths longer than 255 characters in statistics_exit()

Testing Framework Improvements

  • Fixed critical issue that prevented tests from properly isolating test environments
  • Added tests for AJAX framework lazy-load feature
  • Added tests for blocks being added to 'hidden' region
  • Added tests for 7.0->7.x upgrade path

Performance Improvements

Database Performance

  • Added index to comment uid columns to improve user_delete() performance
  • Fixed SELECT MAX(comment_count()) FROM node_comment_statistics() that was causing full table scans
  • Improved language provider file handling to include files only when needed

Cache Handling

  • Added fast Drupal static pattern for locale module
  • Fixed drupal_flush_all_caches() to properly clear entity info cache
  • Improved render cache to not treat empty strings as cache miss

JavaScript Optimizations

  • Micro-optimization in Autocomplete.js
  • Improved JavaScript file handling when 'Aggregate JavaScript files' is enabled
  • Fixed bugs in minified JavaScript files that could cause performance issues

Query Optimization

  • Better handling of taxonomy_get_tree() to prevent inefficient queries with multiple parents
  • Improved token_replace() performance when there are no tokens to replace
  • Fixed SelectQuery::countQuery() to properly handle SQL expressions

Impact Summary

Drupal 7.12 is a maintenance release that significantly improves the stability and developer experience of Drupal 7 without introducing major new features. The release addresses over 100 issues across various components of the system.

The most impactful changes include fixes to critical database handling issues, such as preventing PDO exceptions when saving nodes with long titles and resolving theme registry size problems that could exceed MySQL limits. These fixes help prevent unexpected errors and improve overall site reliability.

For developers, the extensive API documentation improvements across multiple modules make the codebase more accessible and easier to work with. The clarification of function behaviors, return values, and hook implementations provides a more consistent development experience.

Site administrators will benefit from improved installation and update processes, with better display of requirement warnings and more reliable timezone handling. The fixes to the AJAX framework and JavaScript files when minified also contribute to a more stable administrative experience.

Content editors gain from fixes to the poll module, better handling of taxonomy terms, and improved drag-and-drop functionality for shortcuts. The resolution of issues with image field titles and search functionality for multibyte characters also enhances the content creation experience.

End users will notice improvements in menu navigation with custom menus now receiving proper active trails, better handling of RTL languages, and more reliable AJAX progress indicators. The fix for search module support of multibyte characters also improves the search experience for non-Latin languages.

Overall, while Drupal 7.12 doesn't introduce flashy new features, it represents a significant step forward in making Drupal 7 more stable, performant, and developer-friendly.

Statistics:

File Changed223
Line Additions6,135
Line Deletions1,797
Line Changes7,932
Total Commits196

User Affected:

  • Improved API documentation across multiple modules makes development easier
  • Fixed PDO exceptions and database handling issues that previously caused errors
  • Better theme registry handling prevents issues with MySQL max_allowed_packet()
  • More consistent behavior in hook implementations and function returns

Contributors:

webchickdbuytaert