D6 field formatter settings attempts to migrate fields whose storage configuration was skipped

Created on 29 August 2023, over 1 year ago
Updated 18 July 2024, 5 months ago

Problem/Motivation

In d6_field_formatter_settings, there is the following check.

process:
  # We skip field types that don't exist because they weren't migrated by the
  # field migration.
  field_type_exists:
    -
      plugin: migration_lookup
      migration: d6_field
      source:
        - field_name
    -
      plugin: skip_on_empty
      method: row
    -
      plugin: extract
      index:
        - 1

This fails to properly skip the processing the row. If the migration_lookup does not finds a record for field_name, it returns an array containing two null values. Such array fails the skip_on_empty validation. A similar check is part of d6_field_instance and d6_field_instance_widget_settings. In both cases, the order of the skip_on_empty and extract plugins is inverted. That takes care of properly skipping the row when the migration_lookup does not return a migrated record.

d6_field_formatter_settings inverted the process plugins in #2560671: The Migration process plugin should not skip rows .

Steps to reproduce

On a D6 migration that skipped field storage, run the field formatter settings migration.

Proposed resolution

Invert the order of the skip_on_empty and extract plugins to be aligned with d6_field_instance and d6_field_instance_widget_settings.

Remaining tasks

Review patch.
Write tests.

User interface changes

None.

API changes

Not sure if the migration plugin is a public API.

Data model changes

None.

Release notes snippet

None.

🐛 Bug report
Status

Needs work

Version

11.0 🔥

Component
Migration 

Last updated 3 days ago

Created by

🇳🇮Nicaragua dinarcon

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024