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