Passing null to parameter #1 ($url) of type string is deprecated in <b>/var/www/html/web/modules/contrib/linked_entity_reference/src/Plugin/Field/FieldWidget/LinkedEntityReferenceWidgetTrait.php</b> on line <b>35

Created on 28 June 2023, over 1 year ago
Updated 29 June 2023, over 1 year ago

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 on line

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.

🐛 Bug report
Status

RTBC

Version

1.0

Component

Code

Created by

🇪🇸Spain omarlopesino

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024