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...
Comment | File | Size | Author |
---|---|---|---|
#5 | interdiff_3-5.txt | 1.19 KB | heddn |
#5 | 3001828-5.patch | 7.25 KB | heddn |
Comments
Comment #2
heddnIt 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.
Comment #3
heddnHere, 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.
Comment #5
heddnComment #7
heddnComment #8
firfin CreditAttribution: firfin commentedThanks for the fix. Works and the examples is very useful also.