bugfolder's picture

I'm looking into migrating a Drupal 7 site that uses about 80 contrib modules and 94 custom modules. It looks like all but about 10 of the contrib modules have Backdrop equivalents, so it looks like BD is the way to go (especially having read some horror stories about D7->D8). But it looks like a a long development project ahead of me to do the conversion.

I figured I'd start by disabling all of both types of modules, migrating to BD, then slowly trickling in the replacement backdrop modules (including the ones still to be ported). To prepare and understand the migration process, I built a plain vanilla D7 site, then migrated it to Backdrop with no problem. However, when I attempted to use a copy of the db from my real site for the BD migration, on the first attempt to load update.php, I got this error:

Error: Call to undefined function module_implements() in backdrop_autoload() (line 3999 of mysite/webroot/core/includes/bootstrap.inc).

Looking at the code at line 3999 and some debugging, it looks like BD is trying to autoload a class without having included /core/includes/modules.inc. And indeed, adding the line

    include_once BACKDROP_ROOT . '/core/includes/module.inc';

immediately before line 3999,

   foreach (module_implements('autoload_info') as $module) {

eliminates that error message and allows the migration to proceed.

So maybe that line should be added to boostrap.inc permanently? At any rate, I'll post this here in case anyone else runs into the same issue.



Thanks, Robert. I ran into this error while attempting to upgrade from Drupal 7 as well and your suggestion fixed it for my case.