Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Once I configure my External Entity and I add the External Entity field in a content type I can see the list of my external entities in a select element, but when I try to create a node it doesn't works and I see the following error in the logs:
Drupal\Core\Entity\Query\QueryException: You must specify a single bundle for external entity queries. in Drupal\external_entities\Entity\Query\External\Query->prepare() (line 128 of /Users/adriancid/Sites/drupal83-test/modules/external_entities/src/Entity/Query/External/Query.php).
Proposed resolution
Remaining tasks
User interface changes
None.
API changes
Data model changes
Comment | File | Size | Author |
---|---|---|---|
#6 | Screen Shot 2018-07-22 at 17.13.05.png | 250.8 KB | Wim Leers |
#5 | 2881232-5.patch | 3.22 KB | Wim Leers |
|
Comments
Comment #2
dpavon CreditAttribution: dpavon commentedI have a similar problem: I get that very same error whenever I try to create a new field for the external entity. The moment I set the field settings, this exception is thrown, and the form is not saved.
Related to: https://www.drupal.org/node/2907010
Comment #3
adriancidI really don't know how we have 75 sites using this module, I tried many times to use the module in Drupal 8.3 and it does not works.
Comment #4
rp7 CreditAttribution: rp7 for Government of Flanders commentedSteps to reproduce:
Comment #5
Wim LeersI think this can be solved by a custom
@EntityReferenceSelection
plugin. Several entity types in core already have this, for varying reasons, not too different from our reason here (single bundle queries only).Comment #6
Wim LeersScreenshot proving this works, even with the "Select list" widget:
Comment #7
Wim LeersShould we mark this
Closed (won't fix)
because of #2995140: External Entities 2.x?Comment #8
rp7 CreditAttribution: rp7 for Government of Flanders commented@Wim Exactly. This is fixed in #2995140: External Entities 2.x