0

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:mydrupalpass@127.0.0.1/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
  • What is the full console output of the drush command. What step were you at in the migration? – Brady Jan 31 '15 at 10:40
4

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.

  • 1
    migrate_upgrade is only the UI, the IMP sandbox is the place for D7 migrations. Also, we are certainly aiming for a D7->D8 migration path upon the release of Drupal 8.0.0. We need testers so please don't wait for an "official upgrade path", get involved :) – benjy Feb 1 '15 at 2:01
  • 1
    Well yes, and then we can also suggest Drush to perform the migration with a manifest.yml file in the docroot (drupal.org/node/2257723). This would work better for a real use case with a high number of data to migrate. – anavarre Feb 1 '15 at 16:54
  • I moved to the 8.0.0 repo, and I've been playing a bit more. Some success with the users, but I'm not sure if I found a bug (still playing with it though): drupal.stackexchange.com/questions/146101/… – Alejandro Moreno Feb 1 '15 at 19:19
  • Ben, I'm happy to help, both , testing or dev side (I'm Drupal/Symfony developer). Is there any place I should look for things to do/get involved? – Alejandro Moreno Feb 1 '15 at 19:21
  • The IMP sandbox as mentioned in the above post is a good place to start. If you need help, come to #drupal-migrate on IRC. – benjy Feb 2 '15 at 5:46
1

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:mydrupalpass@127.0.0.1/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:mydrupalpass@127.0.0.1/myddbb

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.