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.
Comment | File | Size | Author |
---|---|---|---|
#1 | messaging-update-autoload-1354616-1.patch | 3.35 KB | JoeMcGuire |
Comments
Comment #1
JoeMcGuire CreditAttribution: JoeMcGuire commentedAttached patch removes the
hook_autoload_info()
from Messaging and Messaging Mail and replaces them withfiles[]
entries in their module.info files.