Problem/Motivation
After adding an entity reference from a media library widget, the following error is appearing:
Passing null to parameter #1 ($url) of type string is deprecated in /var/www/html/web/modules/contrib/linked_entity_reference/src/Plugin/Field/FieldWidget/LinkedEntityReferenceWidgetTrait.php on line 35
This happens because the URI property is not available when it comes to print it,
Steps to reproduce
Create a linked entity reference field type that references medias.
Proposed resolution
When URI is not available , build it from the entity the field is referencing.
Comments
Comment #3
omarlopesinoI've created a MR that fix the issue. Please review, thanks!
Comment #4
alzz commentedChecked and it fixes completely the bug.
Comment #5
tunicComment #7
tunicMerged, thanks!
Comment #8
tunic