#2953207: Can't get the right target type when filtering on relationship with bundle-specific target entity type introduced better expansion of paths when an entity reference field may be able to reference multiple bundle types.
When the field resolver is unable to determine which entity type is intended, it throws an exception in this ambiguous case that reads:
Ambiguous path. Try one of the following: foo:bar, foo:baz, before the given path: qux
Its intention was to suggest that a developer change a filter path like field_ref.qux to either field_ref.foo:bar.qux or field_ref.foo:baz.qux.
However, this cannot work because we never introduced the corresponding logic to actually handle a path specifier like foo:bar.
On the surface this seem similar to #2973681: Regression introduced by #2953207: Deep nested include on multi target entity type field fail, but it is not the same because this is about filters and #2973681 is about includes.
| Comment | File | Size | Author |
|---|---|---|---|
| #16 | 2973916-16.patch | 11.05 KB | wim leers |
| #16 | interdiff.txt | 3.58 KB | wim leers |
| #14 | 2973916-14.patch | 10.84 KB | gabesullice |
| #14 | interdiff-11-14.txt | 8.14 KB | gabesullice |
| #11 | interdiff-8-11.txt | 6.69 KB | gabesullice |
Comments
Comment #2
gabesulliceFailing tests.
Comment #3
gabesulliceFixed.
Comment #4
gabesulliceBetter DX error message.
Comment #6
gabesulliceWhoops, realized another case that I hadn't considered.
Comment #7
gabesulliceAnd... the fix.
EDIT:
The failure here is actually a bad test, not a bug.
That's because
field_test_ref1doesn't actually reference a bundle which hasfield_test_1.Comment #8
gabesullicePer #7, I've moved that bad test to the expected exception tests (and added even more). I've added many more of the same type tests that really should work.
Comment #11
gabesulliceFinally, CS violations, more commentary and typo fixes.
Comment #12
wim leersComment #13
wim leers"original" vs "unresolved" vs "raw"
I think we should add that explicit test coverage with the expected error message here. The necessary infrastructure is already here!
What's the difference?
What's the difference?
Comment #14
gabesullice#13.1: Fixed.
13.2: You're right, done.
13.3/4: Good call, updated the test case labels
Comment #15
gabesulliceComment #16
wim leers#14: 👌
Übernit: s/Get/Gets/
5 CS violations.
Fixed.
Comment #17
wim leers