TypeError: CommerceGuys\Intl\Currency\CurrencyRepository::get(): Argument #1 ($currencyCode) must be of type string, null given

Created on 21 November 2024, about 1 month ago

Problem/Motivation

Getting this error when migrating content using drush from Drupal 7 to Drupa 10

 [error]  TypeError: CommerceGuys\Intl\Currency\CurrencyRepository::get(): Argument #1 ($currencyCode) must be of type string, null given, called in web\modules\contrib\commerce_migrate\modules\commerce\src\Plugin\migrate\source\commerce1\ProductVariations.php on line 71 in CommerceGuys\Intl\Currency\CurrencyRepository->get() (line 79 of vendor\commerceguys\intl\src\Currency\CurrencyRepository.php) #0 web\modules\contrib\commerce_migrate\modules\commerce\src\Plugin\migrate\source\commerce1\ProductVariations.php(71): CommerceGuys\Intl\Currency\CurrencyRepository->get(NULL)
#1 web\core\modules\migrate\src\Plugin\migrate\source\SourcePluginBase.php(419): Drupal\commerce_migrate_commerce\Plugin\migrate\source\commerce1\ProductVariations->prepareRow(Object(Drupal\migrate\Row))
#2 web\core\modules\migrate\src\Plugin\migrate\source\SourcePluginBase.php(385): Drupal\migrate\Plugin\migrate\source\SourcePluginBase->next()
#3 web\core\modules\migrate\src\Plugin\migrate\source\SqlBase.php(382): Drupal\migrate\Plugin\migrate\source\SourcePluginBase->rewind()
#4 [internal function]: Drupal\migrate\Plugin\migrate\source\SqlBase->rewind()
#5 web\core\modules\migrate\src\MigrateExecutable.php(184): FilterIterator->rewind()
#6 vendor\drush\drush\includes\drush.inc(62): Drupal\migrate\MigrateExecutable->import()
#7 vendor\drush\drush\includes\drush.inc(53): drush_call_user_func_array(Array, Array)
#8 web\modules\contrib\migrate_tools\src\Drush\Commands\MigrateToolsCommands.php(1074): drush_op(Array)
#9 web\modules\contrib\migrate_tools\src\Drush\Commands\MigrateToolsCommands.php(483): Drupal\migrate_tools\Drush\Commands\MigrateToolsCommands->executeMigration(Object(Drupal\migrate\Plugin\Migration), 'upgrade_commerc...', Array)
#10 [internal function]: Drupal\migrate_tools\Drush\Commands\MigrateToolsCommands->import('', Array)
#11 vendor\consolidation\annotated-command\src\CommandProcessor.php(276): call_user_func_array(Array, Array)
#12 vendor\consolidation\annotated-command\src\CommandProcessor.php(212): Consolidation\AnnotatedCommand\CommandProcessor->runCommandCallback(Array, Object(Consolidation\AnnotatedCommand\CommandData))
#13 vendor\consolidation\annotated-command\src\CommandProcessor.php(176): Consolidation\AnnotatedCommand\CommandProcessor->validateRunAndAlter(Array, Array, Object(Consolidation\AnnotatedCommand\CommandData))
#14 vendor\consolidation\annotated-command\src\AnnotatedCommand.php(391): Consolidation\AnnotatedCommand\CommandProcessor->process(Object(Symfony\Component\Console\Output\ConsoleOutput), Array, Array, Object(Consolidation\AnnotatedCommand\CommandData))
#15 vendor\symfony\console\Command\Command.php(326): Consolidation\AnnotatedCommand\AnnotatedCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#16 vendor\symfony\console\Application.php(1096): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#17 vendor\symfony\console\Application.php(324): Symfony\Component\Console\Application->doRunCommand(Object(Consolidation\AnnotatedCommand\AnnotatedCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#18 vendor\symfony\console\Application.php(175): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#19 vendor\drush\drush\src\Runtime\Runtime.php(110): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#20 vendor\drush\drush\src\Runtime\Runtime.php(40): Drush\Runtime\Runtime->doRun(Array, Object(Symfony\Component\Console\Output\ConsoleOutput))
#21 vendor\drush\drush\drush.php(139): Drush\Runtime\Runtime->run(Array)
#22 vendor\drush\drush\drush(4): require('...')
#23 {main}.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

4.0

Component

Code

Created by

🇧🇩Bangladesh shafiqhossain

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024