Using this module with taxonomy term entities

Created on 14 February 2024, 4 months ago

Problem/Motivation

My migrations for file fields on nodes are going fine, but my taxonomy term "step1" migration isn't finding any files.

Steps to reproduce

I have version 2.0.12, with this patch for Drush 12 compatibility: #4 πŸ› Drush Generator commands are not working in Drush 12.3.0.0 RTBC

  1. I ran drush generate mf2m_media_v3 (entity type: taxonomy_term, source bundle: my_vocab_name, target media type: image, target media type field: field_media_image)
  2. I replaced the media_entity_generator source plugin with media_entity_generator_d7.
  3. I ran drush migrate:duplicate-file-detection mf2m_vocab_canine_stages_step1
  4. No errors (like the time I mistyped, it said "could not find a migration instance for 'name'" -- in this case, it didn't say that), BUT, there was no output whatsoever, none of the Added binary hash c6d81ed7b99541d63f0dd345f4e48698a36a932a for file 60513 I've grown to love).
  5. Meanwhile, migrate status says "0" total for this ^^ step1, and "15" total for the corresponding step2 migration.

I did check some of the taxonomy terms in this vocab, they do have files in their field fields, and the files themselves are "there."
Is there something else I need to do to use this module for file fields on taxonomy term entities?

My YML:

# File to Media Migration configuration for canine_stages migration
langcode: en
status: true
dependencies: {  }
id: mf2m_vocab_canine_stages_step1
class: null
field_plugin_method: null
cck_plugin_method: null
migration_tags: null
migration_group: cornell_cvm_media
label: 'Generate media entities: canine_stages vocab'
source:
  plugin: media_entity_generator_d7
  entity_type: taxonomy_term
  bundle: canine_stages
  include_revisions: false
  langcode: null
  source_langcode: en
  field_names:
    - field_image
process:
  bundle:
    plugin: default_value
    default_value: image
  # Using the alt tag if available, else the file name.
  name:
    plugin: media_name
    source: file_name
  # This process plugin will skip the whole row if a existing media is found.
  existing_media_file:
    plugin: check_media_duplicate
    source: target_id
  # This process plugin will skip the whole row if a duplicate image is found.
  unique_file_id:
    plugin: check_duplicate
    source: target_id
  # Map the field image
  field_media_image/target_id: target_id
  field_media_image/alt: alt
  field_media_image/title: title
  langcode: langcode
  uid: uid
destination:
  plugin: 'entity:media'
migration_dependencies: null

Thank you for this module, and thank you for any help someone might have time to offer!

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ’¬ Support request
Status

Active

Version

2.0

Component

Documentation

Created by

πŸ‡ΊπŸ‡ΈUnited States alison

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024