- Issue created by @rp7
- Merge request !35Issue #3537772: Pass in the correct entity when instantiating the selection handler upon validating referenced entities → (Open) created by rp7
I noticed this issue when working on another issue. When validating if a reference is valid, the selection handler is called. (see https://git.drupalcode.org/project/dynamic_entity_reference/-/blob/4.x/s...).
To this selection handler, the entity making the reference needs to be passed (the $entity
argument). This argument is instantiated here https://git.drupalcode.org/project/dynamic_entity_reference/-/blob/4.x/s... .
But... it's overridden a bit further on @ https://git.drupalcode.org/project/dynamic_entity_reference/-/blob/4.x/s... .
This means that not the referencing entity is passed to the selection handler, but the last referenced entity.
Active
4.0
Code