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.
With the content entity datasource's loadMultiple()
(and, thus, load()
) method it's possible to load entities that are not actually included in the datasource (since their bundle is excluded from it). I think this might make problems if a new node of bundle A is created just as an admin disables bundle A for the datasource. In any case, it makes sense conceptually to only load/return items that are actually in the datasource.
I also added an @todo
comment to that effect to ContentEntity::loadMultiple
.
Comment | File | Size | Author |
---|---|---|---|
#7 | 2574583-7--item_load_exclude_bundles.patch | 7.96 KB | drunken monkey |
|
Comments
Comment #2
drunken monkeyComment #3
drunken monkeyComment #4
drunken monkeyPatch attached, should be self-explanatory.
Comment #7
drunken monkeyComment #8
borisson_This looks great and has sufficient testcoverage. Great work!
Comment #9
drunken monkeyThanks for reviewing!
Committed.