Overriding d7_file, d7_file_entity_item plugins requires source_name values not be changed

Created on 12 April 2023, over 1 year ago
Updated 13 April 2023, over 1 year ago

Problem/Motivation

I'm trying to limit the images migrated from a D7 site to its D10 replacement because not all of the images are required. I'm using Media Migration and have extended d7_file and d7_file_entity_item to add extra conditions in the query() method. For some reason the d7_file replacement doesn't show when I run migrate:status, though when I run the steps in the debug instructions β†’

Steps to reproduce

Extend the d7_file and d7_file_entity_item plugins, have the file_entity one use migration_lookup on the d7_file replacement; i.e. this part appears to be correct.
Run "migrate:status".

What should happen:
* Both migrations show up.

What actually happens:
* Only the file_entity migration shows up.

Proposed resolution

Allow both plugins to be overridden.

Remaining tasks

Work out what's causing this to happen.
Either fix the module, or work out how to fix the custom plugins.

API changes

TBD

πŸ’¬ Support request
Status

RTBC

Version

1.0

Component

Documentation

Created by

πŸ‡ΊπŸ‡ΈUnited States DamienMcKenna NH, USA

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

Comments & Activities

  • Issue created by @DamienMcKenna
  • Status changed to Closed: works as designed over 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States DamienMcKenna NH, USA

    Thanks to help from fjgarlin on DrupalSlack the problem was straightforward - the "source_module" on the custom plugins should have been set to "file" for the d7_file plugin, and "file_entity" for the d7_file_entity_item plugin.

  • Status changed to Needs review over 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States DamienMcKenna NH, USA

    I thought this could be a learning exercise, so here's some documentation.

  • Status changed to RTBC over 1 year ago
  • πŸ‡ͺπŸ‡ΈSpain fjgarlin

    Marking this as RTBC as I ran into the same issue a few months ago and the solution was exactly what's documented here.

  • πŸ‡ΊπŸ‡ΈUnited States DamienMcKenna NH, USA
Production build 0.71.5 2024