Hi all,
I tried to migrate a D6 site to a D8.1.2-dev site and got a problem.
Frist I ran
drush migrate-upgrade --configure-only
drush ms
to check if it's all set up right. After that I could use directly
drush migrate-upgrade
and it works fine with no problems. But I have to use drush migrate-import
command because I don't want to migrate all content.
And there I got a problem with the "fields"
For example
Processed 2 items (0 created, 0 updated, 2 failed, 0 ignored) - done with 'upgrade_d6_field_instance'
and the migrate error message says "Input should be an array."
I don't know where this problem originate from.
Steps to reproduce
1. Set up a D6 page with a content typ with a field and create a filled dummy content.
2. Set up a D8 page with modules migrate, migrate drupal, migrate tools (8.2-x), migrate plus (8.2-x) and migrate upgrade (8.2-x) enabled
3. Run migrate-upgrade --configure-only
4. a) Run migrate-upgrade -> all works fine and the dummy content is shown correctly
b) Run migrate-import --all -> field_instances fails (see above), dummy content has no fields
Comment | File | Size | Author |
---|---|---|---|
#6 | d6tod8.migrate-plugin-migrate-process-extract.txt | 5.47 KB | chriscalip |
#5 | migrate_plus.migration.upgrade_d7_field_instance.yml | 884 bytes | chriscalip |
#5 | migrate_plus.migration.upgrade_d6_field_instance.yml | 1.19 KB | chriscalip |
#4 | d7tod8.success.txt | 3.61 KB | chriscalip |
#4 | d6tod8.error_.txt | 3.93 KB | chriscalip |
Comments
Comment #2
chriscalip CreditAttribution: chriscalip commentedConfirmed! another sighting on my end. Doing a d6 to d8 migration. Using recipe https://drupalize.me/blog/201606/custom-drupal-drupal-migrations-migrate...
Something that might be of interest is that the field instances on d7 to d8 migration .. has field instances instances migrating but not all.
Comment #3
akkonrad CreditAttribution: akkonrad commentedSame behaviour when migrating from D6 to 8.1.6
Migration yaml file: https://www.pastery.net/tdjbnx/
Comment #4
chriscalip CreditAttribution: chriscalip commentedTrying to provide readers with additional information about this error.
It's currently a big PITA to do debug_backtrace and log the result array for further viewing in a dashboard.
I usually store the results of debug_backtrace() to a $log variable and through d.o/project/object_log I am able to see the code flow in a dashbord. Attempts to store that crucial information is currently crashing to : exception 'LogicException' with message The database connection is not serializable.
I was trying to add debug_backtrace on function drush_migrate_tools_migrate_import
It's related to several issues in drupal core already..
Logic Exception with preview button for block-comment
https://www.drupal.org/node/2620346
Serializing the database connection is dangerous and error-prone, make it unserializable again
https://www.drupal.org/node/2463321
Having said that I am sorry If some of my information is wrong..
It looks like :
"upgrade_d6_field_instance" is an instance of /core/modules/field/src/Plugin/migrate/source/d6/FieldInstance.php
"upgrade_d7_field_instance" is an instance of /core/modules/field/src/Plugin/migrate/source/d7/FieldInstance.php
I printed out the $row objects at the prepare method.. the printouts are at the attached files:
d6tod8.error_.txt
d7tod8.success.txt
Comment #5
chriscalip CreditAttribution: chriscalip commentedMore information about the process :
Attached files describes the instances :
migrate_plus.migration.upgrade_d6_field_instance.yml
migrate_plus.migration.upgrade_d7_field_instance.yml
Comment #6
chriscalip CreditAttribution: chriscalip commentedTriangulating error message and d6 field instance yml config file, I've determine the process fails at
/core/modules/migrate/src/Plugin/migrate/process/Extract.php
Attached is the log of Extract failure
d6tod8.migrate-plugin-migrate-process-extract.txt
Brought about by code :
process extract transform method fails because $value is empty.
Comment #7
chriscalip CreditAttribution: chriscalip commentedComment #8
mikeryanHere's the problem:
That should be
migration: upgrade_d6_field
- migrate_upgrade did not properly rewrite the reference there, a bug that was fixed in #2759507: Recursion to apply prefix does not handle arrays.You'll need to either regenerate your migrations with --configure-only, or edit them to add the upgrade_ prefix to any migration: references lacking the prefix.
Comment #9
mikeryanActually, it was #2709349: --configure-only should recurse while adding the upgrade_ prefix in this case...
Comment #10
chriscalip CreditAttribution: chriscalip commentedConfirmed! I've updated the suite of migrate modules to the latest dev snapshots. Re-ran the process and field instance migration for d6 to d8 seems to be in play!
Thanks Mike!
Comment #11
sagar_cis CreditAttribution: sagar_cis as a volunteer commentedHi Mike
I have use your solution but it do not work for me. Can you please tell me exactly what i should do.
Thanks in advance.
Comment #12
drzraf CreditAttribution: drzraf commentedI believe this bug came back between 8.3.1 and 8.3.2
After having done a
migrate-upgrade --configure-only
:$ drush mi --group=migrate_drupal_6
$ drush mmsg upgrade_d6_field_instance
That was not an issue with 8.3.1
Comment #13
drzraf CreditAttribution: drzraf commentedComment #14
drzraf CreditAttribution: drzraf commentedSample of $row:
Comment #15
drzraf CreditAttribution: drzraf commentedThe same kind of buggy config is generated. Why?
[edit] Using 8.3.1, I get the (correct)
migration: upgrade_d6_field
Comment #16
heddnAny other reports of this? I've not see this is a problem with the latest versions of things.
Comment #17
masipila CreditAttribution: masipila as a volunteer commentedheddn,
I was testing #2853872: Migration for forum and article comments: duplicate comment types and incorrect comment_entity_statistics using 3.0-rc1 version of Migrate Upgrade and experienced this weird behavior:
https://www.drupal.org/node/2853872#comment-12244723
I was debugging this for several hours and banging my head against the wall. Eventually maxocub woke up in Canada and we started to debug this together on #drupal-migrate.
The reason why my
drush9 mi upgrade_d7_comment_field
skipped the rows was that it was trying to do the lookup from migrate_map_d7_comment_type database table which was empty. The mapping values were populated to migrate_map_upgrade_d7_comment_type.When I took the latest dev version of Migrate Upgrade, then
drush9 mi upgrade_d7_comment_field
worked as expected.The conclusion I came to with maxocub was that Migrate Upgrade 3.0-rc1 does not work with migration_lookup plugin but only with the deprecated migration plugin.
Would it be possible to cut a new release candidate of Migrate Upgrade?
Cheers,
Markus
Comment #18
heddnDone/fixed: https://www.drupal.org/project/migrate_upgrade/releases/8.x-3.0-rc2