3

I have Drupal 7 users that uses Profile module and has fields for individual languages i.e. presentation_sv, presentation_en that I would like to migrate to a proper Entity translated Drupal 8.

First migration file:

id: custom_user
label: "Custom User accounts"
migration_group: custom
migration_tags:
  - Custom D7
class: Drupal\user\Plugin\migrate\User
source:
  plugin: d7_user
process:
  langcode:
    plugin: default_value
    default_value: sv
  name: name
  pass: pass
  mail: mail
  created: created
  access: access
  login: login
  status: status
  presentation: profile_presentation_sv
destination:
  plugin: entity:user

Here is the translations migration file:

id: custom_user_translations
label: "Translated Custom User accounts"
migration_group: custom
migration_tags:
  - Custom D7
class: Drupal\user\Plugin\migrate\User
source:
  plugin: d7_user
  translations: true
process:
  uid:
    plugin: migration
    source: uid
    migration: custom_user
  langcode:
    plugin: default_value
    default_value: en
  name: name
  pass: pass
  mail: mail
  created: created
  access: access
  login: login
  status: status
  presentation: profile_presentation_en
destination:
  plugin: entity:user
  translations: true
migration_dependencies:
  required:
    - custom_user

The error I get:

Next Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'map.destid2' in 'field list': SELECT map.sourceid1 AS sourceid1, map.destid1 AS destid1, map.destid2 AS destid2
FROM
{migrate_map_custom_user_translations} map
ORDER BY destid1 ASC; Array

1 Answer 1

3

Looks like your migration configuration needs to be re-installed. When I had that issue I deleted the map table (in your case migrate_map_custom_user_translations) and then re-installed the config (I used the config_devel module).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.