I am trying to write custom migrations to migrate my Drupal 7 website to Drupal 8. Currently I am using Drupal 8.6.7 and Drupal 7.61 for a copy of the production website.
So far I have set up the D8 website with Composer (docroot is path / to / web) (https://www.drupal.org/docs/develop/develop/using-composer/using-composer-to-manage-drupal- site dependencies)
I always used Drush for maintenance on the D7 site
and I use Drush 9 for most actions, including migrations to the D8 site.
I've installed the most relevant modules in the D8 site so I can start the migration.
especially all D8 equivalents of the modules I use in the text formats / filters as well as migrate_plus, migrate_tools and migrate_upgrade.
The migration files are generated using the Drush command:
drush @dev migrate-upgrade "$ LEGACYDB" "$ LEGACYURL" --configure-only --migration-prefix = osn_custom_
So far, I have successfully migrated the users and their roles, so I know something about how migrations work.
The problem I am currently working on is the migration of a custom content type called "classified". This type has a standard Drupal 7 body field and a field & # 39; field_image & # 39 ;. Quite usual.
When I use the default migration file, it looks like everything is being migrated but the text is not visible. After research, I found out that this is due to the fact that the input format is set to the D7 code (in my case 2 aka & # 39; full html & # 39;) while in D8 no filter code is present as & # 39; 2 & # 39; referred to as.
I decided that I would as well 2 in & # 39; basic html & # 39; convert and use the D8 configuration and could not migrate the D7 text filters at all.
I've created a migration search plug-in with a static map that converts all D7 codes into the preferred D8 code.
It works fine, but I have the problem that I can not get the migration plug-in to work with the migration of the "classified" migration configuration. So I decided to simplify it and set the format to the default value of & # 39; basic_html & # 39; to put.
Here's what I've tried
The following code snippets only show the body configuration because the other field configurations are generated with the drush command and are not changed.
the standard. The content is migrated, the input format is set to & # 39; 2 & # 39; set.
According to this: https://www.drupal.org/docs/8/api/migrate-api/migrate-process-plugins/migrate-process-overview#nested
and this: https://medium.com/drupal-stories-an-insiders-view/migrate-api-custom-drupal-to-drupal-migration-3bab05da4686
and this: https://www.phase2technology.com/blog/drupal-8-migrations
it should be done like this:
& # 39; body / format & # 39 ;:
& # 39; body / value & # 39; body
However, this leads to the following error:
[error] InvalidArgumentException: Wildcards must have a caster  if they are to be extended with an array of values. in Drupal Core Database Connection-> expandArguments () (line 729 of /Users/helma/Sites/OSND8/dev/web/core/lib/Drupal/Core/Database/Connection.php).
[error] Wildcards must have a caster  if they are to be extended with an array of values. (/Users/helma/Sites/OSND8/dev/web/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php:783)
I have no idea what's going on and what I should do instead. I also do not know how to debug this to find out what to expect.
Can someone give me some hints please?