🇨🇭Switzerland @steva1982

Account created on 20 July 2011, over 13 years ago
#

Recent comments

🇨🇭Switzerland steva1982

ok, I understood.
Thank you for the suggestion.

🇨🇭Switzerland steva1982

Hi @danflanagan8,

My source plugin is a URL:

source:
  # `plugin` inherited from migration group.
  # `data_fetcher_plugin` inherited from migration group.
  # `data_parser_plugin` inherited from migration group.
  # `urls` inherited from migration group.
  urls:
  - https://my-website.com/api/custom-page/retrieve.json?mt=video&nitems=99

The error is:

 [error]  TypeError: Drupal\migrate_plus\Plugin\migrate_plus\data_parser\Json::selectByDepth(): Argument #1 ($raw_data) must be of type array, null given, called in /var/opt/www/usilu_test/docs/web/modules/contrib/migrate_plus/src/Plugin/migrate_plus/data_parser/Json.php on line 72 in Drupal\migrate_plus\Plugin\migrate_plus\data_parser\Json->selectByDepth() (line 103 of /var/opt/www/usilu_test/docs/web/modules/contrib/migrate_plus/src/Plugin/migrate_plus/data_parser/Json.php) #0 /var/opt/www/usilu_test/docs/web/modules/contrib/migrate_plus/src/Plugin/migrate_plus/data_parser/Json.php(72): Drupal\migrate_plus\Plugin\migrate_plus\data_parser\Json->selectByDepth()
#1 /var/opt/www/usilu_test/docs/web/modules/contrib/migrate_plus/src/Plugin/migrate_plus/data_parser/Json.php(130): Drupal\migrate_plus\Plugin\migrate_plus\data_parser\Json->getSourceData()
#2 /var/opt/www/usilu_test/docs/web/modules/contrib/migrate_plus/src/DataParserPluginBase.php(153): Drupal\migrate_plus\Plugin\migrate_plus\data_parser\Json->openSourceUrl()
#3 /var/opt/www/usilu_test/docs/web/modules/contrib/migrate_plus/src/DataParserPluginBase.php(96): Drupal\migrate_plus\DataParserPluginBase->nextSource()
#4 /var/opt/www/usilu_test/docs/web/modules/contrib/migrate_plus/src/DataParserPluginBase.php(87): Drupal\migrate_plus\DataParserPluginBase->next()
#5 [internal function]: Drupal\migrate_plus\DataParserPluginBase->rewind()
#6 /var/opt/www/usilu_test/docs/web/modules/contrib/migrate_plus/src/DataParserPluginBase.php(229): iterator_count()
#7 /var/opt/www/usilu_test/docs/web/core/modules/migrate/src/Plugin/migrate/source/SourcePluginBase.php(539): Drupal\migrate_plus\DataParserPluginBase->count()
#8 /var/opt/www/usilu_test/docs/web/core/modules/migrate/src/Plugin/migrate/source/SourcePluginBase.php(509): Drupal\migrate\Plugin\migrate\source\SourcePluginBase->doCount()
#9 /var/opt/www/usilu_test/docs/web/modules/contrib/migrate_tools/src/EventSubscriber/MigrationDrushCommandProgress.php(69): Drupal\migrate\Plugin\migrate\source\SourcePluginBase->count()
#10 /var/opt/www/usilu_test/docs/web/modules/contrib/migrate_tools/src/Drush/Commands/MigrateToolsCommands.php(1065): Drupal\migrate_tools\EventSubscriber\MigrationDrushCommandProgress->initializeProgress()
#11 /var/opt/www/usilu_test/docs/web/modules/contrib/migrate_tools/src/Drush/Commands/MigrateToolsCommands.php(483): Drupal\migrate_tools\Drush\Commands\MigrateToolsCommands->executeMigration()
#12 [internal function]: Drupal\migrate_tools\Drush\Commands\MigrateToolsCommands->import()
#13 /var/opt/www/usilu_test/docs/vendor/consolidation/annotated-command/src/CommandProcessor.php(276): call_user_func_array()
#14 /var/opt/www/usilu_test/docs/vendor/consolidation/annotated-command/src/CommandProcessor.php(212): Consolidation\AnnotatedCommand\CommandProcessor->runCommandCallback()
#15 /var/opt/www/usilu_test/docs/vendor/consolidation/annotated-command/src/CommandProcessor.php(176): Consolidation\AnnotatedCommand\CommandProcessor->validateRunAndAlter()
#16 /var/opt/www/usilu_test/docs/vendor/consolidation/annotated-command/src/AnnotatedCommand.php(391): Consolidation\AnnotatedCommand\CommandProcessor->process()
#17 /var/opt/www/usilu_test/docs/vendor/symfony/console/Command/Command.php(326): Consolidation\AnnotatedCommand\AnnotatedCommand->execute()
#18 /var/opt/www/usilu_test/docs/vendor/symfony/console/Application.php(1096): Symfony\Component\Console\Command\Command->run()
#19 /var/opt/www/usilu_test/docs/vendor/symfony/console/Application.php(324): Symfony\Component\Console\Application->doRunCommand()
#20 /var/opt/www/usilu_test/docs/vendor/symfony/console/Application.php(175): Symfony\Component\Console\Application->doRun()
#21 /var/opt/www/usilu_test/docs/vendor/drush/drush/src/Runtime/Runtime.php(110): Symfony\Component\Console\Application->run()
#22 /var/opt/www/usilu_test/docs/vendor/drush/drush/src/Runtime/Runtime.php(40): Drush\Runtime\Runtime->doRun()
#23 /var/opt/www/usilu_test/docs/vendor/drush/drush/drush.php(139): Drush\Runtime\Runtime->run()
#24 /var/opt/www/usilu_test/docs/vendor/drush/drush/drush(4): require('...')
#25 /var/opt/www/usilu_test/docs/vendor/bin/drush(119): include('...')
#26 {main}. 
🇨🇭Switzerland steva1982

Hi,
I have the same problem because my migration YML file had item_selector: /.
Looking for other issues, I found only this morning this trick 📌 Add note about item_selector: 0 in Migrate JSON Example module RTBC and it works for me.
Probably is not the best solution, but for the moment it allows me to import.

🇨🇭Switzerland steva1982

thank you @tylerfrankenstein, I'll try it!

🇨🇭Switzerland steva1982

Hi @poker10, I agree.

But, maybe, I understand the problem:

  • my requirements require a 2880x1620 pixels image
  • i want to upload a 2880x1920 pixels image
  • Drupal resizes it to have 1620 pixel as height, but its new length will be 2'430 pixels in order to preserve the aspect ratio...too small!

Right?
Thanks again

🇨🇭Switzerland steva1982

Hi,
after having updated Drupal core to 7.99 version, I have this problem:

  1. I want to upload an image and my requirements are "Images must be at least 2880x1620 pixels. Images larger than 2880x1620 pixels will be resized."
  2. I select an image with dimensions like 2880x1920
  3. two different messages appear (see the image)

With an other website with Drupal 7.98, the image is uploaded.
Am I doing something wrong?
Thanks.

Ste

Production build 0.71.5 2024