- π«π·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 - @duaelfr opened merge request.
- Status changed to Needs review
about 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
10 months ago 190 pass - last update
10 months ago 196 pass - π¨π¦Canada fengtan Montreal, Canada
I tested both patches (against 5.x and 6.x) and they both worked.