Problem/Motivation

Ran into a problem where migration_lookup was failing when the lookup was being done on a derivation of a configured migration.

id: d7_commerce_product_variation
  product_id:
    plugin: migration_lookup 
    migration: d7_commerce_product
    source: entity_id

d7_commerce_product has a deriver and after configuration, one of the derivations is 'd7_commerce_product_hats'. When I ran drush mim d7_commerce_product_variation_hats it was always failing because the migration_lookup shown above was failing. Debugged that and found that it was using the wrong name for the map table. Instead of migrate_map_d7_commerce_product_hats (the table name in the db) it was using migrate-map_d7_commerce_product__hats (extra underscore). I didn't investigate any further.

Just noting it here in case someone encounters something like this.

Proposed resolution

TBD

Remaining tasks

Reproduce the error

User interface changes

API changes

Data model changes

Comments

quietone created an issue. See original summary.

edysmp’s picture

migration_lookup proces plugin is in core.

heddn’s picture

Project: Migrate Plus » Drupal core
Version: 8.x-4.x-dev » 8.6.x-dev
Component: API » migration system

Moving queues

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

kkri’s picture

I am having the same issue migrating products.
When trying to resolve the product variations, MigrateLookup.php looks in the wrong table (migrate_map_commerce1_product_variation__apparel instead of migrate_map_commerce1_product_variation_apparel) and finds nothing.

source:
  plugin: commerce1_product_display
  product_type: apparel_model
process:
  product_id: nid
  title: title
  type: type
  uid: uid
  body: body
  status: status
  created: created
  changed: changed
  path: path
  variations:
    plugin: migration_lookup
    migration: commerce1_product_variation
    source: variations_field

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.

smustgrave’s picture

Issue tags: +Bug Smash Initiative

This came up as the daily BSI target

Unfortunately not super familiar with the migrate system but wonder if #2845340: migrate mapping & messages table names are truncated, can lead to incorrect mapping lookups may be related with regards to the look up and wrong name?

quietone’s picture

This is definitely a different problem from the truncated names problem. An extra underscore character appears in the name of the lookup table.