If you enable the messaging_mail module with a hook_update_N() executed via drush updb -y then you will get an error "Class not found" when loading the /user page until you do another drush cc all or rebuilt the autoload registry.

This is because we're currently using the older hook_autoload_info() method to expose the Messaging Module's classes.

Although patch #1351748: Autoload classes not found on enable sees the autoload registry built correctly after each module is enabled unfortunately when all updates are finished Drush rebuilds the autoload registry again but with an old module list returns in module_list() which means the newly enabled modules do not have their classes included and resulting in the error above.

This is an issue with Drush's logic - but I think the best way forward is to abandon the old hook_autoload_info() in favour of the Drupal 7 style files[] references in the module.info file. The autoload module correctly processes these references even when the module is enabled via hook_update_N() and Drush.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

JoeMcGuire’s picture

Status: Active » Needs review
FileSize
3.35 KB

Attached patch removes the hook_autoload_info() from Messaging and Messaging Mail and replaces them with files[] entries in their module.info files.