When uninstalling a module with Drush, Webform randomly crashes. This is because module_load_include() isn't accessible sometimes.
If you read the documentation, the function must only be used within a other function and not globally.
Patch follows.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | 2858460-4-webform-module_load_include.patch | 689 bytes | tessa bakker |
Comments
Comment #2
tessa bakkerThe patch will fix this issue, but it would be better to move every hook to webform.module and create a system that autoload every my_module.webform.inc file with webform hooks. Like the module Tokens en Views.
Comment #3
jrockowitz commentedI am using these includes to just isolate specific hooks. I am open to create an autoload.
Looks like core is using 'require_once __DIR__ . '/file.field.inc';'
@see http://cgit.drupalcode.org/drupal/tree/core/modules/file/file.module?h=8...
require_once 'includes/webform.libraries.inc';should be changedrequire_once __DIR__ . 'includes/webform.libraries.inc';Comment #4
tessa bakkerGood catch!
New patch, with __DIR__
Comment #6
jrockowitz commented