Closed (won't fix)
Project:
Drupal core
Version:
8.2.x-dev
Component:
migration system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
23 Mar 2017 at 19:49 UTC
Updated:
28 Mar 2017 at 22:35 UTC
Jump to comment: Most recent
Comments
Comment #2
albertski commentedI am trying to debug this and seeing it goes through the MigrateSkipRowException for the first field which is the taxonomy field. This is my debug message:
Drupal\migrate\MigrateSkipRowException: in /var/www/mysite/web/core/modules/migrate/src/Plugin/migrate/process/SkipOnEmpty.php on line 27Comment #3
albertski commentedAs a test, I removed the skip on empty from migrate_plus.migration.upgrade_d6_field_instance.yml and tried running the upgrade_d6_field_instance migration and I get the following errors for all the fields that are taxonomy terms:
Comment #4
albertski commentedOkay so now I'm thinking the issues is in upgrade_d6_field. When I run upgrade_d6_field the taxonomy fields don't get created at all.
migrate_plus.migration.upgrade_d6_field.yml
Comment #5
albertski commentedI added the following to process -> type -> map in migrate_plus.migration.upgrade_d6_field.yml and I think the taxonomy fields get created:
Now I am getting errors during upgrade_d6_field_formatter_settings. If I run
drush mmsg upgrade_d6_field_formatter_settingsI get the following errors:Comment #6
albertski commentedFixed the about errors by adding the following to upgrade_d6_field_formatter_settings:
And this to migrate_plus.migration.upgrade_d6_field_instance_widget_settings.yml:
I think now everything migrated as far as fields but not seeing taxonomy term data.
Comment #7
albertski commentedI noticed that that during the taxonomy revision migrations they would say they were all ignored. I made the following changes to the yml files:
Update from:
To:
It had vid instead of nid. When I made this change It showed it migrated them all but don't see any data in the database tables.
Comment #8
albertski commentedWhen I look at the taxonomy entity reference field I noticed that they are set as Content Entity Reference instead of Taxonomy. Perhaps this may be the reason the terms are not coming in now.
Comment #9
albertski commentedActually, #7 is wrong. I think it should be vid (Version id) for revisions.
One thing I did try is to convert the field to a Taxonomy Reference as I mentioned in #8 and then run the upgrade_d6_term_node_7 migration and none of the references get added (table is empty).
In debugging I found that in EntityContentBase::updateEntity:
my $field_name is for example 'regions' and $field is null.
Comment #10
albertski commentedI was able to get my terms to migrate by updating the field name inside the term_node_x.yml and term_node_revision_x.yml files to include the field underscore in the name:
Old:
New:
Once I did that everything migrated correctly.
Comment #11
albertski commentedI'm closing this issue because I believe this will be fixed in #2447727: Add base class for migrating reference fields.
At the end of the day if anyone runs into this you can try to follow how I went about it but I was able to go through it by debugging it and updating the yml files.
Comment #12
joey-santiago commentedmhm sorry i think i am having a similar problem, haven't understood there you added this field_ you mention in #10.
node_complete.page.yml:
and the term_rev.yml migration:
I get the terms created, but i don't get any of the terms being used in the nodes that are created in the node_complete.page.yml, even that there should be some.