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';

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

keesje created an issue. See original summary.

keesje’s picture

Since module_load_include will be deprecated in drupal 9 anyway, lets use the moduleHandler class.

keesje’s picture

Issue summary: View changes
gg24’s picture

Assigned: Unassigned » gg24
Status: Active » Reviewed & tested by the community

Hi @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!

gg24’s picture

Assigned: gg24 » Unassigned

  • Berdir committed dd26886 on 8.x-1.x authored by keesje
    Issue #2901237 by keesje: Call to undefined function module_load_include...
Berdir’s picture

Status: Reviewed & tested by the community » Fixed

Committed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.