I'm trying to link a field in my spreadsheet file to a user that is previously created with a migration from the same spreadsheet. The Backup column consists of multiple names divided by the backward slash (Firstname Lastname/Firstname Lastname)


      plugin: explode
      delimiter: '/'
      source: 'Backup'
      plugin: entity_lookup
      value_key: name
      ignore_case: true
      entity_type: user
      bundle_key: uid
      bundle: people


      plugin: concat
        - 'Firstname'
        - 'Lastname'
      delimiter: ' '

The backup field is just skipped when migrating the profiles. The only error I'm getting is when i go to a profile page and check the log messages.

User error: "attributes" is an invalid render array key in Drupal\Core\Render\Element::children() (regel 97 van /var/www/html/web/core/lib/Drupal/Core/Render/Element.php) #0 /var/www/html/web/core/includes/bootstrap.inc(587): _drupal_error_handler_real(256, '"attributes" is...', '/var/www/html/w...', 97, Array) #1 [internal function]: _drupal_error_handler(256, '"attributes" is...', '/var/www/html/w...', 97, Array) #2

/var/www/html/web/core/lib/Drupal/Core/Render/Element.php(97): trigger_error('"attributes" is...', 256) #3


Can you not use entity_lookup for users or am I doing something wrong in my configuration?

Any help would be much appreciated

2 Answers 2


bundle_key is the name of the column and bundle is any value associated with that column.

In the below example the migration process will look for those column in user table whose status is 1 and uid value is equal to userid.

 plugin: entity_lookup
 source: userid
 value_key: uid
 bundle_key: status
 bundle: 1
 entity_type: user
 ignore_case: true
  • bundle_key is the key containing the entity bundle. It cannot be used for other fields, as it would compare those to the entity bundle in the site receiving the migration.
    – apaderno
    Commented Jul 21, 2021 at 21:02

If entity_lookup is searching for users, then the bundle should also be user, since there is no people bundle.

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.