Media reference field gets target_id set to 1 for every row

Created on 22 December 2021, over 2 years ago
Updated 27 February 2024, 4 months ago

Field values for new media entity references on node bundles are not getting populated

Here is the migration config I'm using:

  field_image_media:    
    -    
      plugin: sub_process    
      source: field_thumbnail    
      process:    
        target_id:    
          -    
            plugin: migration_lookup    
            source: fid    
            migration: upgrade_d7_file    
            no_stub: true    
          -    
            plugin: update_file_to_image    

When using the update_file_to_document plugin, this config works for creating new media entities and populating the node entity reference fields with the correct values. For image media, the field_image_media_target_id (for a field_image_media field) is always 1, which is obviously not correct.

I've gone over this a little in the #migration slack channel, and was happy to get the migration working for document (file) fields, but I haven't been able to get the image fields to migrate in the same way, which is why I'm opening an issue here, for some more visibility while I continue to debug my process.

πŸ“Œ Task
Status

Postponed

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States stephenplatz

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024