Module version 2.0.9
Drupal 8.9.2
I have followed the steps exactly as outlined in the module documentation but I am having an issue where this command fails
drush migrate:duplicate-file-detection 'migration_name'
module name is migrate_files
migrate_plus.migration.migrate_files_accomm_step1.yml
# File to Media Migration configuration for Accomm migration
id: migrate_files_accomm_step1
label: Accomm Media
migration_group: media
source:
plugin: media_entity_generator
entity_type: node
bundle: accomodation
langcode: en
field_names:
- field_images
destination:
plugin: entity:media
process:
bundle:
plugin: default_value
default_value: image
# Using the alt tag if available, else the file name.
name:
plugin: media_name
source: file_name
# This process plugin will skip the whole row if a existing media is found.
existing_media_file:
plugin: check_media_duplicate
source: target_id
# This process plugin will skip the whole row if a duplicate image is found.
unique_file_id:
plugin: check_duplicate
source: target_id
# Map the field image
field_media_image/target_id: target_id
field_media_image/alt: alt
field_media_image/title: title
langcode: langcode
dependencies:
module:
- migrate_files
enforced:
module:
- migrate_files
migrate_plus.migration.migrate_files_accomm_step2.yml
# This migration links the newly created media entities with entity reference field on the target bundle.
id: migrate_files_accomm_step2
label: Accomm Mapping
migration_group: media
source:
plugin: content_entity:node
bundle: accomodation
include_translations: false
destination:
plugin: entity:node
process:
nid: nid
type:
plugin: default_value
default_value: accomodation
field_images_media:
plugin: file_id_lookup
source: field_images
migration: migrate_files_accomm_step1
no_stub: true
migration_dependencies:
optional:
- migrate_files_accomm_step1
dependencies:
module:
- migrate_files
enforced:
module:
- migrate_files
when i run
drush migrate:duplicate-file-detection migrate_files_accomm_step1
I get this error
Array
[error] Error: Object of class Drupal\Core\StringTranslation\TranslationManager could not be converted to string in Symfony\Component\Console\Formatter\OutputFormatter->format() (line 133 of /app/vendor/symfony/console/Formatter/OutputFormatter.php) #0 /app/vendor/symfony/console/Output/Output.php(155): Symfony\Component\Console\Formatter\OutputFormatter->format(Object(Drupal\Core\StringTranslation\TranslationManager))
#1 /app/vendor/symfony/console/Output/Output.php(132): Symfony\Component\Console\Output\Output->write(Array, true, 1)
#2 /app/web/modules/contrib/migrate_file_to_media/src/Commands/MediaMigrateCommands.php(303): Symfony\Component\Console\Output\Output->writeln(Object(Drupal\Core\StringTranslation\TranslatableMarkup))
#3 [internal function]: Drupal\migrate_file_to_media\Commands\MediaMigrateCommands->duplicateFileDetection('migrate_files_a...', Array)
#4 /app/vendor/consolidation/annotated-command/src/CommandProcessor.php(257): call_user_func_array(Array, Array)
#5 /app/vendor/consolidation/annotated-command/src/CommandProcessor.php(212): Consolidation\AnnotatedCommand\CommandProcessor->runCommandCallback(Array, Object(Consolidation\AnnotatedCommand\CommandData))
#6 /app/vendor/consolidation/annotated-command/src/CommandProcessor.php(176): Consolidation\AnnotatedCommand\CommandProcessor->validateRunAndAlter(Array, Array, Object(Consolidation\AnnotatedCommand\CommandData))
#7 /app/vendor/consolidation/annotated-command/src/AnnotatedCommand.php(302): Consolidation\AnnotatedCommand\CommandProcessor->process(Object(Symfony\Component\Console\Output\ConsoleOutput), Array, Array, Object(Consolidation\AnnotatedCommand\CommandData))
#8 /app/vendor/symfony/console/Command/Command.php(255): Consolidation\AnnotatedCommand\AnnotatedCommand->execute(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 /app/vendor/symfony/console/Application.php(1005): Symfony\Component\Console\Command\Command->run(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 /app/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))
#11 /app/vendor/symfony/console/Application.php(148): Symfony\Component\Console\Application->doRun(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#12 /app/vendor/drush/drush/src/Runtime/Runtime.php(118): Symfony\Component\Console\Application->run(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#13 /app/vendor/drush/drush/src/Runtime/Runtime.php(49): Drush\Runtime\Runtime->doRun(Array, Object(Symfony\Component\Console\Output\ConsoleOutput))
#14 /app/vendor/drush/drush/drush.php(72): Drush\Runtime\Runtime->run(Array)
#15 /app/vendor/drush/drush/drush(4): require('/app/vendor/dru...')
#16 {main}.
Error: Object of class Drupal\Core\StringTranslation\TranslationManager could not be converted to string in /app/vendor/symfony/console/Formatter/OutputFormatter.php on line 133 #0 /app/vendor/symfony/console/Output/Output.php(155): Symfony\Component\Console\Formatter\OutputFormatter->format(Object(Drupal\Core\StringTranslation\TranslationManager))
#1 /app/vendor/symfony/console/Output/Output.php(132): Symfony\Component\Console\Output\Output->write(Array, true, 1)
#2 /app/web/modules/contrib/migrate_file_to_media/src/Commands/MediaMigrateCommands.php(303): Symfony\Component\Console\Output\Output->writeln(Object(Drupal\Core\StringTranslation\TranslatableMarkup))
#3 [internal function]: Drupal\migrate_file_to_media\Commands\MediaMigrateCommands->duplicateFileDetection('migrate_files_a...', Array)
#4 /app/vendor/consolidation/annotated-command/src/CommandProcessor.php(257): call_user_func_array(Array, Array)
#5 /app/vendor/consolidation/annotated-command/src/CommandProcessor.php(212): Consolidation\AnnotatedCommand\CommandProcessor->runCommandCallback(Array, Object(Consolidation\AnnotatedCommand\CommandData))
#6 /app/vendor/consolidation/annotated-command/src/CommandProcessor.php(176): Consolidation\AnnotatedCommand\CommandProcessor->validateRunAndAlter(Array, Array, Object(Consolidation\AnnotatedCommand\CommandData))
#7 /app/vendor/consolidation/annotated-command/src/AnnotatedCommand.php(302): Consolidation\AnnotatedCommand\CommandProcessor->process(Object(Symfony\Component\Console\Output\ConsoleOutput), Array, Array, Object(Consolidation\AnnotatedCommand\CommandData))
#8 /app/vendor/symfony/console/Command/Command.php(255): Consolidation\AnnotatedCommand\AnnotatedCommand->execute(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 /app/vendor/symfony/console/Application.php(1005): Symfony\Component\Console\Command\Command->run(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 /app/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))
#11 /app/vendor/symfony/console/Application.php(148): Symfony\Component\Console\Application->doRun(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#12 /app/vendor/drush/drush/src/Runtime/Runtime.php(118): Symfony\Component\Console\Application->run(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#13 /app/vendor/drush/drush/src/Runtime/Runtime.php(49): Drush\Runtime\Runtime->doRun(Array, Object(Symfony\Component\Console\Output\ConsoleOutput))
#14 /app/vendor/drush/drush/drush.php(72): Drush\Runtime\Runtime->run(Array)
#15 /app/vendor/drush/drush/drush(4): require('/app/vendor/dru...')
#16 {main}
Error: Object of class Drupal\Core\StringTranslation\TranslationManager could not be converted to string in Symfony\Component\Console\Formatter\OutputFormatter->format() (line 133 of /app/vendor/symfony/console/Formatter/OutputFormatter.php).
[warning] Drush command terminated abnormally.
I dont have any translations at all. As suggested in another issue, I have tried with setting the langcode value to both en and und (which breaks it worse).
Clearly Ive done something wrong, but Ive gone over the steps over and over ensuring not to miss anything.
Any ideas? Help greatly appreciated. Happy yo provide any other info that is required.