Why does "drush migrate-manifest" fail?

by Alejandro Moreno   Last Updated April 21, 2018 19:07 PM

I'm trying this migration: https://github.com/amool/migrate_drupal7

but with this command:

drush migrate-manifest modules/contrib/migrate_drupal7/config/install/
migrate.migration.d7_user.yml --legacy-db-url=mysql://DrupalAdminUser:[email protected]/myddbb

I get this:

PHP Fatal error:  Call to a member function getLoadPlugin() on a non-object in /www/drupal8/core/modules/migrate_drupal/src/MigrationStorage.php on line 73

Any idea?

full log:

    substr() expects parameter 1 to be string, array given MigrationStorage.php:34                                                              [warning]
array_flip(): Can only flip STRING and INTEGER values! MigrationStorage.php:47                                                              [warning]
array_flip(): Can only flip STRING and INTEGER values! MigrationStorage.php:47                                                              [warning]
array_flip(): Can only flip STRING and INTEGER values! MigrationStorage.php:47                                                              [warning]
array_flip(): Can only flip STRING and INTEGER values! EntityStorageBase.php:220                                                            [warning]
array_flip(): Can only flip STRING and INTEGER values! EntityStorageBase.php:220                                                            [warning]
array_flip(): Can only flip STRING and INTEGER values! EntityStorageBase.php:220                                                            [warning]
PHP Fatal error:  Call to a member function getLoadPlugin() on a non-object in /www/drupal8/core/modules/migrate_drupal/src/MigrationStorage.php on line 73
PHP Stack trace:
PHP   1. {main}() /opt/drush7/vendor/drush/drush/drush.php:0
PHP   2. drush_main() /opt/drush7/vendor/drush/drush/drush.php:16
PHP   3. Drush\Boot\DrupalBoot->bootstrap_and_dispatch() /opt/drush7/vendor/drush/drush/drush.php:76
PHP   4. drush_dispatch() /opt/drush7/vendor/drush/drush/lib/Drush/Boot/DrupalBoot.php:46
PHP   5. call_user_func_array:{/opt/drush7/vendor/drush/drush/includes/command.inc:178}() /opt/drush7/vendor/drush/drush/includes/command.inc:178
PHP   6. drush_command() /opt/drush7/vendor/drush/drush/includes/command.inc:178
PHP   7. _drush_invoke_hooks() /opt/drush7/vendor/drush/drush/includes/command.inc:210
PHP   8. call_user_func_array:{/opt/drush7/vendor/drush/drush/includes/command.inc:359}() /opt/drush7/vendor/drush/drush/includes/command.inc:359
PHP   9. drush_migrate_manifest() /opt/drush7/vendor/drush/drush/includes/command.inc:359
PHP  10. entity_load_multiple() /opt/drush7/vendor/drush/drush/commands/core/migrate.d8.drush.inc:48
PHP  11. Drupal\migrate_drupal\MigrationStorage->loadMultiple() /www/drupal8/core/includes/entity.inc:203

Fatal error: Call to a member function getLoadPlugin() on a non-object in /www/drupal8/core/modules/migrate_drupal/src/MigrationStorage.php on line 73

Call Stack:
    0.0006     238800   1. {main}() /opt/drush7/vendor/drush/drush/drush.php:0
    0.0451     290784   2. drush_main() /opt/drush7/vendor/drush/drush/drush.php:16
    0.3256    2469480   3. Drush\Boot\DrupalBoot->bootstrap_and_dispatch() /opt/drush7/vendor/drush/drush/drush.php:76
    1.2927    6020640   4. drush_dispatch() /opt/drush7/vendor/drush/drush/lib/Drush/Boot/DrupalBoot.php:46
    1.6091    8205856   5. call_user_func_array:{/opt/drush7/vendor/drush/drush/includes/command.inc:178}() /opt/drush7/vendor/drush/drush/includes/command.inc:178
    1.6091    8206344   6. drush_command() /opt/drush7/vendor/drush/drush/includes/command.inc:178
    1.6097    8207512   7. _drush_invoke_hooks() /opt/drush7/vendor/drush/drush/includes/command.inc:210
    1.6113    8242520   8. call_user_func_array:{/opt/drush7/vendor/drush/drush/includes/command.inc:359}() /opt/drush7/vendor/drush/drush/includes/command.inc:359
    1.6113    8243040   9. drush_migrate_manifest() /opt/drush7/vendor/drush/drush/includes/command.inc:359
    1.6271    8274032  10. entity_load_multiple() /opt/drush7/vendor/drush/drush/commands/core/migrate.d8.drush.inc:48
    1.6364    8355688  11. Drupal\migrate_drupal\MigrationStorage->loadMultiple() /www/drupal8/core/includes/entity.inc:203

Drush command terminated abnormally due to an unrecoverable error.                                                                          [error]
Error: Call to a member function getLoadPlugin() on a non-object in /www/drupal8/core/modules/migrate_drupal/src/MigrationStorage.php, line
73
Tags : 8 migration


Answers 2


Note that the Github repo you're trying to use hasn't been updated since Jul 1, 2014, which means a lifetime in the D8 development cycle.

You should probably read Will migrating content types be possible? which gives some pointers about D7 to D8 migrations. However, note that https://www.drupal.org/upgrade/migrate will hold best practices for migrations once it's ready in Core. Currently it isn't, thus why instead of trying to help you with this Github repo directly I'd like to encourage you to help with the migrate_upgrade module efforts and IMP initiative first, which aim at unblocking D6 to D8 migrations for 8.0.0

IIRC D7 to D8 migrations will be supported not before 8.1.x and you can follow the development and help in chx's IMP sandbox. Make sure to also follow issues with the D8 Migration Component tag. All in all, I think there are so many moving pieces at play in a D7 to D8 migration that it'd be better if you could wait that the community has vetted an official upgrade path.

anavarre
anavarre
January 31, 2015 11:14 AM

The problem is how you're trying to run the migration, eg:

drush migrate-manifest modules/contrib/migrate_drupal7/config/install/
migrate.migration.d7_user.yml --legacy-db-url=mysql://DrupalAdminUser:[email protected]/myddbb

That isn't the manifest Migrate is looking for. Manifest files in the config/install directory of a Drupal 8 module are config entities that are copied into the Drupal 8 site when the module is enabled.

What Migrate wants is a manifest that lists the migrations you want run so to simply run the user migration, create a file called "manifest.yml" in your site root that looks like this:

 - d7_user

And then run like so:

drush migrate-manifest manifest.yml --legacy-db-url=mysql://DrupalAdminUser:[email protected]/myddbb

The user migration is simple enough, the Yaml file in that Github repo, while not complete, looks like it would work to me.

benjy
benjy
January 31, 2015 22:50 PM

Related Questions



Migrate Dimensions

Updated April 23, 2015 00:03 AM

Migrate class not registering properly

Updated July 26, 2015 13:03 PM


Display inline images imported from phpBB

Updated April 08, 2015 18:03 PM