Problem/Motivation
// For the 'target_bundles' setting, a NULL value is equivalent to "allow
// entities from any bundle to be referenced" and an empty array value is
// equivalent to "no entities from any bundle can be referenced".
and
// If 'target_bundles' is NULL, all bundles are referenceable, no further
// conditions are needed.
and
// If 'target_bundles' is an empty array, no bundle is referenceable,
// force the query to never return anything and bail out early.
This seems weird but there is a reason -- @berdir on Slack writes:
> the null vs empty array situation is due to config dependencies and updates. if you allow a single target bundle, then remove that bundle, the field would now allow any bundle if you weren't making a difference between null and empty array.
This should be documented in the code -- probably added to the comment in defaultConfiguration()
Steps to reproduce
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
Comments
Comment #4
soham sengupta commentedHi, I have added the changes and created the MR. Moving the issue status to Needs Review.
Thank you.
Comment #5
smustgrave commentedHaven't reviewed but MR should be against 11.x
Comment #6
rodrigoaguileraFix the base branch of the MR
Comment #7
drupatz commentedworking on this one at Barcelone2024
Comment #9
drupatz commentedComment #10
joachim commentedLooks like this needs work as there's a merge error.
Text is great apart from one small thing:
> // is to correctly handle the config updates.
Shouldn't be a 'the' here.
Comment #11
drupatz commentedRemoved the "the" --- couldn't find any merge issue, maybe tested the wrong pr? Should be 9630
Comment #12
joachim commentedAh right!
There's a 2nd MR shown at the top of the issue, on the same line, which confused me.
In which case, RTBC!
Comment #13
quietone commentedComment #15
quietone commentedThanks to everyone for improving our documentation!
Didn't mean to remove the Novice tag. The first sentence of this MR was not wrapped correctly, fixed on commit.
Committed e1a109a and pushed to 11.x. Thanks!