I am trying to lookup a commerce_product but running into a wall.
Probably I am messing up somewhere, but I am having problems finding anything about the first error. And there are many posts about the other two, but so far I could not find anything that works for me.

Have been trying different settings for the entity_lookup plugin, starting with:

process:
  product_id:
    plugin: entity_lookup
    source: E
    value_key: field_ean

Which yields: Destination field type integeris not a recognized reference type.
The missing space between integer and is is not a typo btw, that is was drush tells me.

Adding
entity_type: commerce_product -> The entity_lookup plugin requires a entity_type, none located.

Adding

     bundle_key: type
     bundle: default

Gets me this message: Missing bundle for entity type commerce_product (/app/web/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php:86)

Could really use a clue here...

CommentFileSizeAuthor
#5 interdiff_3-5.txt1.19 KBheddn
#5 3001828-5.patch7.25 KBheddn
#3 3001828.patch7.27 KBheddn
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

firfin created an issue. See original summary.

heddn’s picture

It would appear that field_ean is not a reference field but rather a field of type integer. However, it does look like there's a typo in the exception being thrown. So we could probably fix that.

heddn’s picture

Status: Active » Needs review
FileSize
7.27 KB

Here, this fixes the error message and demonstrates via a test how one has to pass the needed context info if someone wants to use an integer field to store the entity_id.

Status: Needs review » Needs work

The last submitted patch, 3: 3001828.patch, failed testing. View results

heddn’s picture

Status: Needs work » Needs review
FileSize
7.25 KB
1.19 KB

  • heddn committed 84c5ed5 on 8.x-4.x
    Issue #3001828 by heddn, firfin: field type integeris not a recognized...
heddn’s picture

Status: Needs review » Fixed
firfin’s picture

Thanks for the fix. Works and the examples is very useful also.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.