Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
After updating core to 8.3.6 token.module throws this error:
"Fatal error: Call to undefined function module_load_include() in /var/www/html/deploy/docroot/modules/contrib/token/token.module on line 217"
Looks like "module.inc" is not included when hook_module_implements_alter() is executed? This could be a project-related, not sure.
Proposed resolution
I could fix this with:
-- module_load_include('inc', 'token', 'token.tokens');
++ require_once __DIR__ . '/token.tokens.inc';
Comment | File | Size | Author |
---|---|---|---|
#2 | fix_include-2901237-2.patch | 611 bytes | keesje |
|
Comments
Comment #2
keesje CreditAttribution: keesje commentedSince module_load_include will be deprecated in drupal 9 anyway, lets use the moduleHandler class.
Comment #3
keesje CreditAttribution: keesje commentedComment #4
gg24 CreditAttribution: gg24 as a volunteer and at QED42 commentedHi @keesje,
I am not able to reproduce the bug. I tested it on Drupal 8.4.x. Please confirm is this issue is only on Drupal 8.3.6.
I see this change can be made which you suggested in the above patch. Hence issuing RTBC to the above patch.
Thanks!
Comment #5
gg24 CreditAttribution: gg24 as a volunteer and at QED42 commentedComment #7
BerdirCommitted.