TypeError: unserialize(): Argument #1 ($data) must be of type string, array given in unserialize() (line 58

Created on 17 January 2023, almost 2 years ago

Problem/Motivation

 [error]  TypeError: unserialize(): Argument #1 ($data) must be of type string, array given in unserialize() (line 60 of /app/web/modules/contrib/migrate_process_url/src/Plugin/migrate/process/FieldLinkGenerate.php) #0 /app/web/modules/contrib/migrate_process_url/src/Plugin/migrate/process/FieldLinkGenerate.php(60): unserialize(Array)
#1 /app/web/modules/contrib/migrate_process_url/src/Plugin/migrate/process/FieldLinkGenerate.php(38): Drupal\migrate_process_url\Plugin\migrate\process\FieldLinkGenerate->fetchAttrs(Object(Drupal\migrate\Row))
#2 /app/web/core/modules/migrate/src/MigrateExecutable.php(448): Drupal\migrate_process_url\Plugin\migrate\process\FieldLinkGenerate->transform('/gdts_pdf_gener...', Object(Drupal\migrate_tools\MigrateExecutable), Object(Drupal\migrate\Row), 'field_url_dynam...')
#3 /app/web/core/modules/migrate/src/MigrateExecutable.php(221): Drupal\migrate\MigrateExecutable->processPipeline(Object(Drupal\migrate\Row), 'field_url_dynam...', Array, '/gdts_pdf_gener...')
#4 /app/vendor/drush/drush/includes/drush.inc(206): Drupal\migrate\MigrateExecutable->import()
#5 /app/vendor/drush/drush/includes/drush.inc(197): drush_call_user_func_array(Array, Array)
#6 /app/web/modules/contrib/migrate_tools/src/Commands/MigrateToolsCommands.php(963): drush_op(Array)
#7 [internal function]: Drupal\migrate_tools\Commands\MigrateToolsCommands->executeMigration(Object(Drupal\migrate\Plugin\Migration), 'product', Array)
#8 /app/web/modules/contrib/migrate_tools/src/Commands/MigrateToolsCommands.php(417): array_walk(Array, Array, Array)
#9 [internal function]: Drupal\migrate_tools\Commands\MigrateToolsCommands->import('product', Array)
#10 /app/vendor/consolidation/annotated-command/src/CommandProcessor.php(257): call_user_func_array(Array, Array)
#11 /app/vendor/consolidation/annotated-command/src/CommandProcessor.php(212): Consolidation\AnnotatedCommand\CommandProcessor->runCommandCallback(Array, Object(Consolidation\AnnotatedCommand\CommandData))
#12 /app/vendor/consolidation/annotated-command/src/CommandProcessor.php(176): Consolidation\AnnotatedCommand\CommandProcessor->validateRunAndAlter(Array, Array, Object(Consolidation\AnnotatedCommand\CommandData))
#13 /app/vendor/consolidation/annotated-command/src/AnnotatedCommand.php(350): Consolidation\AnnotatedCommand\CommandProcessor->process(Object(Symfony\Component\Console\Output\ConsoleOutput), Array, Array, Object(Consolidation\AnnotatedCommand\CommandData))
#14 /app/vendor/symfony/console/Command/Command.php(255): Consolidation\AnnotatedCommand\AnnotatedCommand->execute(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#15 /app/vendor/symfony/console/Application.php(1027): Symfony\Component\Console\Command\Command->run(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#16 /app/vendor/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand(Object(Consolidation\AnnotatedCommand\AnnotatedCommand), Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#17 /app/vendor/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#18 /app/vendor/drush/drush/src/Runtime/Runtime.php(118): Symfony\Component\Console\Application->run(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#19 /app/vendor/drush/drush/src/Runtime/Runtime.php(48): Drush\Runtime\Runtime->doRun(Array, Object(Symfony\Component\Console\Output\ConsoleOutput))
#20 /app/vendor/drush/drush/drush.php(72): Drush\Runtime\Runtime->run(Array)
#21 /app/vendor/drush/drush/drush(4): require('/app/vendor/dru...')
#22 /app/vendor/bin/drush(117): include('/app/vendor/dru...')
#23 {main}.

Steps to reproduce

Migrate Import URL with empty attrs in Drupal 9 and PHP 8.1

Proposed resolution

More defensive implementation to handle this.

Remaining tasks

Review

User interface changes

-

API changes

-

Data model changes

-

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇩🇪Germany zuernbernhard

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

No activities found.

Production build 0.71.5 2024