Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 295277

d6_term_node_revision migration ignores a lot of items that it shouldn't

$
0
0

While working on a D6 -> D8 migration, I noticed that over 90% of the items for the d6_term_node_revision migration were being ignored, which seemed high. Using xdebug to trace the migration, I identified some specific items that were being ignored that I was pretty sure should be valid. I believe the issue is with the process specification in d6_term_node_revision.yml:

process:
  vid:
    -
      plugin: migration_lookup
      migration: d6_node
      source: vid
    -
      plugin: skip_on_empty
      method: row

It's trying to translate the node revision ID (which doesn't actually need translating (but might in the future)) as a means of ensuring that items for which the node doesn't exist are skipped (https://www.drupal.org/project/drupal/issues/2588945). However, it's specifying d6_node, meaning it looks in migrate_map_d6_node_[content_type], which maps node IDs, not revision IDs. Hence why about 6% of the items, in my case, are getting through - those are the ones that are lucky and happen to have a revision ID that's also a valid node ID.

I thought I could just change the migration parameter for migration_lookup in the above code to d6_node_revision, but that results in all items being ignored (because the migration plugin manager is finding no instances for that migration ID in migration lookup's transform function), so I seem to still be missing a piece of the puzzle.


Viewing all articles
Browse latest Browse all 295277

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>