- 🇫🇷France duaelfr Montpellier, France
We could take advantage of
\Drupal\Core\Field\FieldItemBase::mainPropertyName
I'll open a new MR on the 6.0.x branch - Merge request !75Issue #3227250: Entity lookup can't find an entity when looking for a reference field → (Merged) created by duaelfr
- Status changed to Needs review
over 1 year ago 11:01am 13 April 2023 - 🇫🇷France duaelfr Montpellier, France
Expanded the tests coverage. Here is the tests-only patch to demonstrate the issue.
- 🇬🇧United Kingdom joachim
This will be affected by 🐛 ResourceTypeRepository wrongly assumes that all entity reference fields have the setting "target_type" Fixed .
- 🇫🇷France duaelfr Montpellier, France
Thank you for your feedback!
I had a look at the issue you are referencing but I cannot see how it could affect our current use case astarget_type
is not used inEntityLookup
. Can you be a bit more specific, please, so I can prepare myself to update the MR? - 🇬🇧United Kingdom joachim
Ah, you're using mainPropertyName().
I hadn't looked at the MR, sorry -- I'd assumed the code would use target_id.
- 🇩🇪Germany osopolar 🇩🇪 GER 🌐
I am wondering if the entity lookup could be done providing the subfield like
value_key: field_media_document.target_id
. I had a similar issue where the lookup was successful but then I experienced an "unknown field" error, see #3354308 for more details and workaround. - 🇨🇦Canada fengtan Montreal, Canada
- last update
over 1 year ago 190 pass - last update
over 1 year ago 196 pass - 🇨🇦Canada fengtan Montreal, Canada
I tested both patches (against 5.x and 6.x) and they both worked.
- Status changed to RTBC
3 months ago 5:14pm 26 September 2024 - First commit to issue fork.
- Status changed to Fixed
16 days ago 4:54pm 4 December 2024 Automatically closed - issue fixed for 2 weeks with no activity.