Issue #1115688: Port to Drupal 7 and resolve various errors.