Should not unset 'title' key in element array

Created on 12 August 2024, 4 months ago

Problem/Motivation

Came across this issue when trying to save a media item with no value in the remote url field. The Core Link module is expcting the "title" key be present in the element array and throws an error because its not.

Warning: Trying to access array offset on value of type null in Drupal\link\Plugin\Field\FieldWidget\LinkWidget::validateTitleNoLink() (line 176 of core/modules/link/src/Plugin/Field/FieldWidget/LinkWidget.php).

Steps to reproduce

Go to add a new media item and try to save with an empty remote url value.

Proposed resolution

Patch attached

πŸ› Bug report
Status

Needs review

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States peachez

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

Comments & Activities

Production build 0.71.5 2024