Andrew Fletcher published: 8 October 2022 (updated) 26 October 2022 1 minute read
Working through and importing JSON data into a content type.
Drush migration commands
Check the status of the migration data
lando drush migrate-status
Reset the migration status
lando drush migrate-reset-status migratable_riverdata_json
Import JSON data
lando drush migrate-import migratable_riverdata_json
Rollback to before the import
lando drush migrate-rollback migratable_riverdata_json
Errors
What to do when a migration fails? You will see a response similar to
lando drush migrate-import migratable_basic_content_json
3/3 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%
[notice] Processed 3 items (0 created, 0 updated, 3 failed, 0 ignored) in 1.1 seconds (162.7/min) - done with 'migratable_basic_content_json'
In MigrateRunnerCommands.php line 458:
migratable_basic_content_json migration: 3 failed.
The details in this are scant and offer no value. To do so, you will need to get the migrate messages.
lando drush migrate:messages
If you have the following response
Not enough arguments (missing: "migrationId").
You are missing your id. In the example above, I need to use migrate able_basic_content_json
lando drush migrate:messages migratable_basic_content_json
Response
------- --------------------------------------- ------------------- ------------------------------------------------------------------------
Level Source ID(s) Destination ID(s) Message
------- --------------------------------------- ------------------- ------------------------------------------------------------------------
1 Day 2 - Breakout session 3 livestream migratable_basic_content_json:field_tags:explode: NULL is not a string
1 Subscription test migratable_basic_content_json:field_tags:explode: NULL is not a string
1 Subscription test - Media migratable_basic_content_json:field_tags:explode: NULL is not a string
------- --------------------------------------- ------------------- ------------------------------------------------------------------------
Now we know what the issue is and where to focus attention.
Related articles
Andrew Fletcher
•
04 Apr 2025
Managing .gitignore changes
When working with Git, the .gitignore file plays a critical role in controlling which files and folders are tracked by version control. Yet, many developers are unsure when changes to .gitignore take effect and how to manage files that are already being tracked. This uncertainty can lead to...
Andrew Fletcher
•
26 Mar 2025
How to fix the ‘Undefined function t’ error in Drupal 10 or 11 code
Upgrading to Drupal 10.4+ you might have noticed a warning in their code editor stating “Undefined function ‘t’”. While Drupal’s `t()` function remains valid in procedural code, some language analysis tools — such as Intelephense — do not automatically recognise Drupal’s global functions. This...
Andrew Fletcher
•
17 Mar 2025
Upgrading to PHP 8.4 challenges with Drupal contrib modules
The upgrade from PHP 8.3.14 to PHP 8.4.4 presents challenges for Drupal 10.4 websites, particularly when dealing with contributed modules. While Drupal core operates seamlessly, various contrib modules have not yet been updated to accommodate changes introduced in PHP 8.4.x. This has resulted in...