0

So I'm new to Drupal, and I'm trying to set up a migration. I followed a tutorial to import a basic csv as an article yesterday, that worked ok. There are no errors showing using the admin area of Drupal.

I tried to create a new migration following this guide (https://www.cmsdrupal.com/blog/how-import-data-csv-file-drupal-8-best-tools-and-approaches-you-can-use) but modified for a spreadsheet not a csv. I got to step 7 of the first section and Drush throws an error.

I've tried running a migrate status and that too throws an error

vendor/bin/drush migrate:status

The error I get is:

#1 /var/www/pnm.com/html/core/modules/migrate/src/Plugin/Migration.php(625): Drupal\migrate\Plugin\Migration->findMigrationDependencies(NULL)
#2 /var/www/pnm.com/html/core/modules/migrate/src/Plugin/MigrationPluginManager.php(122): Drupal\migrate\Plugin\Migration->getMigrationDependencies()
#3 /var/www/pnm.com/html/modules/contrib/migrate_tools/src/Commands/MigrateToolsCommands.php(701): Drupal\migrate\Plugin\MigrationPluginManager->createInstances(Array)
#4 /var/www/pnm.com/html/modules/contrib/migrate_tools/src/Commands/MigrateToolsCommands.php(140): Drupal\migrate_tools\Commands\MigrateToolsCommands->migrationsList('', Array)
#5 [internal function]: Drupal\migrate_tools\Commands\MigrateToolsCommands->status('', Array)
#6 /var/www/pnm.com/vendor/consolidation/annotated-command/src/CommandProcessor.php(257): call_user_func_array(Array, Array)
#7 /var/www/pnm.com/vendor/consolidation/annotated-command/src/CommandProcessor.php(212): Consolidation\AnnotatedCommand\CommandProcessor->runCommandCallback(Array, Object(Consolidation\AnnotatedCommand\CommandData))
#8 /var/www/pnm.com/vendor/consolidation/annotated-command/src/CommandProcessor.php(176): Consolidation\AnnotatedCommand\CommandProcessor->validateRunAndAlter(Array, Array, Object(Consolidation\AnnotatedCommand\CommandData))
#9 /var/www/pnm.com/vendor/consolidation/annotated-command/src/AnnotatedCommand.php(302): Consolidation\AnnotatedCommand\CommandProcessor->process(Object(Symfony\Component\Console\Output\ConsoleOutput), Array, Array, Object(Consolidation\AnnotatedCommand\CommandData))
#10 /var/www/pnm.com/vendor/symfony/console/Command/Command.php(255): Consolidation\AnnotatedCommand\AnnotatedCommand->execute(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#11 /var/www/pnm.com/vendor/symfony/console/Application.php(1000): Symfony\Component\Console\Command\Command->run(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#12 /var/www/pnm.com/vendor/symfony/console/Application.php(255): Symfony\Component\Console\Application->doRunCommand(Object(Consolidation\AnnotatedCommand\AnnotatedCommand), Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#13 /var/www/pnm.com/vendor/symfony/console/Application.php(148): Symfony\Component\Console\Application->doRun(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#14 /var/www/pnm.com/vendor/drush/drush/src/Runtime/Runtime.php(118): Symfony\Component\Console\Application->run(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#15 /var/www/pnm.com/vendor/drush/drush/src/Runtime/Runtime.php(49): Drush\Runtime\Runtime->doRun(Array, Object(Symfony\Component\Console\Output\ConsoleOutput))
#16 /var/www/pnm.com/vendor/drush/drush/drush.php(72): Drush\Runtime\Runtime->run(Array)
#17 /var/www/pnm.com/vendor/drush/drush/drush(4): require('/var/www/pnm.co...')
#18 {main}. 
TypeError: Argument 1 passed to Drupal\migrate\Plugin\Migration::getProcessNormalized() must be of the type array, null given, called in /var/www/pnm.com/html/core/modules/migrate/src/Plugin/Migration.php on line 640 in /var/www/pnm.com/html/core/modules/migrate/src/Plugin/Migration.php on line 396 #0 /var/www/pnm.com/html/core/modules/migrate/src/Plugin/Migration.php(640): Drupal\migrate\Plugin\Migration->getProcessNormalized(NULL)
#1 /var/www/pnm.com/html/core/modules/migrate/src/Plugin/Migration.php(625): Drupal\migrate\Plugin\Migration->findMigrationDependencies(NULL)
#2 /var/www/pnm.com/html/core/modules/migrate/src/Plugin/MigrationPluginManager.php(122): Drupal\migrate\Plugin\Migration->getMigrationDependencies()
#3 /var/www/pnm.com/html/modules/contrib/migrate_tools/src/Commands/MigrateToolsCommands.php(701): Drupal\migrate\Plugin\MigrationPluginManager->createInstances(Array)
#4 /var/www/pnm.com/html/modules/contrib/migrate_tools/src/Commands/MigrateToolsCommands.php(140): Drupal\migrate_tools\Commands\MigrateToolsCommands->migrationsList('', Array)
#5 [internal function]: Drupal\migrate_tools\Commands\MigrateToolsCommands->status('', Array)
#6 /var/www/pnm.com/vendor/consolidation/annotated-command/src/CommandProcessor.php(257): call_user_func_array(Array, Array)
#7 /var/www/pnm.com/vendor/consolidation/annotated-command/src/CommandProcessor.php(212): Consolidation\AnnotatedCommand\CommandProcessor->runCommandCallback(Array, Object(Consolidation\AnnotatedCommand\CommandData))
#8 /var/www/pnm.com/vendor/consolidation/annotated-command/src/CommandProcessor.php(176): Consolidation\AnnotatedCommand\CommandProcessor->validateRunAndAlter(Array, Array, Object(Consolidation\AnnotatedCommand\CommandData))
#9 /var/www/pnm.com/vendor/consolidation/annotated-command/src/AnnotatedCommand.php(302): Consolidation\AnnotatedCommand\CommandProcessor->process(Object(Symfony\Component\Console\Output\ConsoleOutput), Array, Array, Object(Consolidation\AnnotatedCommand\CommandData))
#10 /var/www/pnm.com/vendor/symfony/console/Command/Command.php(255): Consolidation\AnnotatedCommand\AnnotatedCommand->execute(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#11 /var/www/pnm.com/vendor/symfony/console/Application.php(1000): Symfony\Component\Console\Command\Command->run(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#12 /var/www/pnm.com/vendor/symfony/console/Application.php(255): Symfony\Component\Console\Application->doRunCommand(Object(Consolidation\AnnotatedCommand\AnnotatedCommand), Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#13 /var/www/pnm.com/vendor/symfony/console/Application.php(148): Symfony\Component\Console\Application->doRun(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#14 /var/www/pnm.com/vendor/drush/drush/src/Runtime/Runtime.php(118): Symfony\Component\Console\Application->run(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#15 /var/www/pnm.com/vendor/drush/drush/src/Runtime/Runtime.php(49): Drush\Runtime\Runtime->doRun(Array, Object(Symfony\Component\Console\Output\ConsoleOutput))
#16 /var/www/pnm.com/vendor/drush/drush/drush.php(72): Drush\Runtime\Runtime->run(Array)
#17 /var/www/pnm.com/vendor/drush/drush/drush(4): require('/var/www/pnm.co...')
#18 {main}
TypeError: Argument 1 passed to Drupal\migrate\Plugin\Migration::getProcessNormalized() must be of the type array, null given, called in /var/www/pnm.com/html/core/modules/migrate/src/Plugin/Migration.php on line 640 in Drupal\migrate\Plugin\Migration->getProcessNormalized() (line 396 of /var/www/pnm.com/html/core/modules/migrate/src/Plugin/Migration.php).
 [warning] Drush command terminated abnormally.

running other drush commands seems to work fine.

The yaml file I imported is:

id: loopy_releases_spreadsheet_import3
label: Import Casio Loopy releases
migration_groups:
  - releases

source:
  plugin: spreadsheet
  file: /var/www/pnm.com/imports/loopy.releases.ods
  worksheet: 'releases'
  origin: A2
  header_row: 1


  columns:
    - ID
    - 'Game Title'
    - 'System  ID'
    - 'Release Title'
    - 'Original Title (If Not English)'
    - Developer
    - Publisher
    - Label
    - Region
    - 'Release Day'
    - 'Release Month'
    - 'Release Year'
    - 'Manufacturer Code'
    - Barcode
    - Rarity
    - Description
    - 'Genres(s)'
    - Media
    - Body
    - Verified
    - 'Internal Notes'
    - Sources

  row_index_column: 'Row no.'

  keys:
    ID:
      type: string

  # Handle mapping of fields and processing here
  process:
    field_release_internal_id: ID
    title: 'Release Title'
    body: Description

  destination:
    plugin: entity:node
    default_bundle: release

The migration does not show up anywhere in structure migrations.

Looking at the import I did yesterday I can view the fields using:

vendor/bin/drush migrate:import article_csv_import

but looking at the import I just tried I get the same error as above:

vendor/bin/drush migrate:fields-source loopy_releases_spreadsheet_import
0

You might just be missing dependencies...

type: module
name: Joomla Migrate
description: 'Joomla 3.5 to Drupal 8 migration.'
package: Migration
# core: 8.x
dependencies:
 - drupal:migrate
 - migrate_plus:migrate_plus
 - migrate_drupal_ui
 - migrate_tools
 - migrate_file

# version: '8.x-3.0-beta1'
# core: '8.x'

# Information added by Drupal.org packaging script on 2017-04-29
version: '8.x-1.x-dev'
core: '8.x'
project: 'joomla_migrate'
datestamp: 1493431790

| improve this answer | |
  • Hi, thanks for getting back to me. I have the following modules installed and enabled: migrate, migrate_plus, migrate_tools, migrate_source_csv, migrate_spreadsheet. I'm not upgrading from Joomla (or an earlier Drupal) this is just import fresh data from a spreadsheet (ods). I've installed the modules through composers so dependencies should all be installed. – Al_ Apr 13 at 21:26
  • understanddrupal.com/articles/…. You can get the Migrate Google Sheets module using composer: composer require 'drupal/migrate_spreadsheet:^1.0'. This module depends on the PHPOffice/PhpSpreadsheet` library and many PHP extensions including ext-zip. Check this page for a full list of dependencies. If any required extension is missing the installation will fail. If your Drupal site is not composer-based, you will not be able to use Migrate Spreadsheet, unless you go around a lot of hoops. – Jeff W Petersen Apr 13 at 21:40
  • I installed it by using composer so all dependencies should be installed. The installation was successful. My setup had all been through composer. – Al_ Apr 13 at 22:08
0

In the end I uninstalled all the migration module except for the base module, then I reinstalled them again. This seems to have cleared up the drush errors.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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