I've been working on a Drupal 6 to 8 migration. The Drupal 6 site includes Ubercart. I have a variety of Commerce modules enabled on the Drupal 8 site including Commerce Migrate and Commerce Migrate Ubercart. When attempting to migrate the field instances, all were ignored including fields related to non-Commerce content. I started a new migration without any Commerce modules enabled and the field instances migrated just fine. I've been using version 2.0-beta9.

Comments

rprager created an issue. See original summary.

rprager’s picture

rprager’s picture

Title: All fields instances ignored » All field instances ignored

After trying to migrate field instances, I checked the migrate_map_upgrade_d6_field_instance table and found that the destid1, destid2, and destid3 columns were null for all records.

Any idea why I can't migrate fields? I need some help ASAP.

quietone’s picture

Component: Miscellaneous » Ubercart D6
Status: Active » Postponed (maintainer needs more info)

Just a bit of triage.

Off the top of my head I don't have an idea why the migration of all the field instances failed. The first field migration is d6_field. Is the migrate map for d6_field populated? If so, did they all succeed or did some fail. Which were the failures and which ones are the successes?

quietone’s picture

damienmckenna’s picture

Title: All field instances ignored » Ubercart 6 product field data not migrated
Status: Postponed (maintainer needs more info) » Postponed

Streamlining related issues.

I think the D7 issue should be fixed first, given there's a WIP patch, then see what's left for this one.

damienmckenna’s picture

Parent issue: » #2872836: [Meta] Ubercart 6
Würden’s picture

I am also seeing this bug working on a D6 to D8 migration including ubercart. Fields are migrated but they are not attached to any entities afterwards. Not only are fields not attached to product entities, no node types get fields attached.
So I guess there is a bug somewhere in the commerce_migrate module, I also think the generated YAML looks somewhat odd. Here is an example:

  node_type:
    -
      plugin: migration_lookup
      migration: upgrade_d6_node_type
      source: type_name
  product_node_type:
    -
      plugin: migration_lookup
      migration: uc6_product_type
      source: type_name
  bundle:
    -
      plugin: callback
      source:
        - '@node_type'
        - '@product_node_type'
      callable: array_filter
    -
      plugin: callback
      callable: current
    -
      plugin: skip_on_empty
      method: row
destination:
  plugin: 'entity:field_config'
migration_dependencies:
  required:
    - upgrade_d6_node_type
    - upgrade_d6_field
    - uc6_product_type
  optional:
    - upgrade_d6_field
    - upgrade_d6_node_type
    - uc6_product_type

Without commerce_migrate installed, it looks more like this:

  bundle:
    -
      plugin: migration
      migration: upgrade_d6_node_type
      source: type_name
    -
      plugin: skip_on_empty
      method: row
destination:
  plugin: 'entity:field_config'
migration_dependencies:
  required:
    - upgrade_d6_node_type
    - upgrade_d6_field
  optional:
    - upgrade_d6_field
    - upgrade_d6_node_type

My best solution right now is to create two migration groups and run the separately in a custom module one for commerce migration and another for everything else.