[PP-1] bundle_key configuration for entity_lookup process plugin isn't necessary

Created on 19 January 2018, almost 7 years ago
Updated 12 April 2023, over 1 year ago

There's no point in having this in entity_lookup AFAICT.

If you're detecting the entity type and bundle from the field, then you ask the entity type manager service for the bundle key:

            $this->lookupBundleKey = $this->lookupBundleKey ?: $this->entityManager->getDefinition($this->lookupEntityType)->getKey('bundle');

But if the developer specifies the entity type and bundle in the configuration, the bundle key can ALSO be obtained from the entity type manager! There is no other value the bundle key can be, it's entirely determined by the entity type.

📌 Task
Status

Postponed

Version

4.0

Component

Plugins

Created by

🇬🇧United Kingdom joachim

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇦🇺Australia thtas

    Yes this can create some nasty bugs.

    We ended up associating terms from the wrong vocabulary because the documentation isn't clear that you both bundle AND bundle_key are required, it just says:

     * - bundle_key: (optional) The name of the bundle field on the entity type
     *   being queried.
     * - bundle: (optional) The value to query for the bundle - can be a string or
     *   an array.
    

    This implies that both are optional and makes no mention that `bundle` is useless without `bundle_key`.

Production build 0.71.5 2024