Problem
I've been hitting errors with a D6 migration.
First, I hit this error:
[error] InvalidArgumentException: Field upload is unknown. in Drupal\Core\Entity\ContentEntityBase->getTranslatedField() (line 587 of /.../core/lib/Drupal/Core/Entity/ContentEntityBase.php).
[error] Field upload is unknown. (/.../core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php:846)
Though the field name was different, this solution worked for me. To sum it up:
- Revert the specific migration:
drush migrate:rollback upgrade_d6_upload
- Run
drush updb
- Run
drush cr
- Rerun the migration:
drush migrate:import upgrade_d6_upload
That got rid of the first slew of errors and allowed most of the items to migrate.
But then there were new errors:
[error] InvalidArgumentException: The entity cannot be translated since it is language neutral (und). in Drupal\Core\Entity\ContentEntityBase->addTranslation() (line 958 of /.../core/lib/Drupal/Core/Entity/ContentEntityBase.php).
[error] The entity cannot be translated since it is language neutral (und). (/.../core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php:846)
The solution for these new errors was to "unlock" the und
language. Thanks to diewe for this solution!
- Enable the
language
module. - Export the config.
- Edit the
language.entity.und.yml
, changinglocked
totrue
. - Import the config.
- Rollback and reimport
upgrade_d6_upload
All uploads then migrated without error.