Duplicate Files in Different Bundles Get Skipped

Created on 13 April 2021, about 4 years ago
Updated 5 June 2023, almost 2 years ago

Problem/Motivation

If the same file has been added to two or more nodes in two or more bundles, the newly-created media ID of that file will only be associated with the first instance. Finding the media ID during the second phase of the migration is limited to the step1 map of the bundle associated with that particular node

Steps to reproduce

  1. Add image file (e.g. file01.jpg) to node in any bundle, e.g. article
  2. Add same image file to node in another bundle, e.g. page
  3. Run Migrate File to Media
  4. Observe that while file01.jpg exists in the media "library" it only appears on the first node (e.g. article) and not any others (e.g. page)

Proposed resolution

Alter FileIdLookup method to either examine all step_1 maps, or perhaps more efficiently, query the database to find the media id if not found in the bundle map.

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

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.71.5 2024