So the idea is to use plugin migrate.process "migration" to migrate d7 field data to d8 field data.
Using migrate.process migration is better than plugin migrate.process "get" to prevent id collisions and lets us do continual migration.
This currently fails:
field_drupal8_pages:
plugin: migration
migration: ya_node_page
source: field_drupal7_pages
✝ vagrant@multi-vlad ✝ ../site/vlad_aux/d7d8-dev
$ drush ms
Group: ya_example Status Total Imported Unprocessed Last imported
d6_file Idle 34 34 0 2016-09-16 16:40:23
ya_user_role Idle 4 4 0 2016-09-16 16:40:33
ya_user Idle 2 2 0 2016-09-16 16:40:40
ya_node_page Idle 10 10 0 2016-09-16 16:40:48
ya_node_article Idle 8 1 6 2016-09-16 17:15:34
✝ vagrant@multi-vlad ✝ ../site/vlad_aux/d7d8-dev
$ drush mi ya_node_article --limit=1
Processed 1 item (0 created, 0 updated, 1 failed, 0 ignored) - done with 'ya_node_article' [status]
✝ vagrant@multi-vlad ✝ ../site/vlad_aux/d7d8-dev
$ drush mmsg ya_node_article
source_ids_hash level message
33c8981f3a32ae575f410557a535f68eead82c0d3535cbfa5025bb9658e93d64 1 Extra unknown items in source IDs
As reference this migration uses community documentation :
Migrating Drupal 7 Page, Article to Drupal 8 Page, Article
https://www.drupal.org/node/2801003
Comments
Comment #2
chriscalip commentedComment #3
chriscalip commentedFile core/modules/migrate/src/Plugin/migrate/id_map/Sql.php edited to add drush_print_r for profiling purposes.
Error Run Screenshot
Comment #4
chriscalip commentedComment #5
chriscalip commentedComment #6
chriscalip commentedComment #7
mikeryanJust to be clear, what is the D7 field type of field_drupal7_pages? entity_reference?
Comment #8
mikeryanI played around with this locally and reproduced the problem when trying to map the field as you did. Looking at how a term reference field mapping was generated in the same migration, though:
I changed my entity reference field mapping as follows, and it worked:
So, I don't think this is an actual bug, it's a matter of D7 field mappings requiring going through more hoops than D6. I'm not entirely sure why D6 is able to get away with more straight-forward mappings - it'd be nice if we could get it to recognize that
source: field_related_nodesmeans get the primary value column (target_id) by default.Comment #9
chriscalip commented@mikeryan
Thanks mike! I will update the drupal 8 migration api community documentation cookbook to include this tip.
Comment #10
chriscalip commentedI am closing this issue because although the fix does not technically tackle the fail
The fix is a workaround through :
This is good enough. The actual fix should be another issue.
Comment #11
chriscalip commented