Problem/Motivation

entity_usage_validate_entity_update makes a call to $media->get('field_title')->getString()

This field is not part of the Media entity definition and so may not exist. When the field does not exist, this causes a fatal error.

Steps to reproduce

Install this module using standard core install profile
Publish a node with a reference to an unpublished media entity

Proposed resolution

Use $media->label()

Remaining tasks

Review & commit

User interface changes

May be a slight UX change for situations with field title does exist

API changes

n/a

Data model changes

n/a

Comments

ericgsmith created an issue. See original summary.

ericgsmith’s picture

Status: Active » Needs review
StatusFileSize
new621 bytes
ericgsmith’s picture

Seems alpha tags are ahead of dev branch? https://git.drupalcode.org/project/entity_usage_validate/-/compare/1.0.x...

Patch against alpha 2

  • 2ec4479e committed on 1.0.x
    Issue #3355512 by ericgsmith: Use media label for media title in...
klidifia’s picture

Status: Needs review » Reviewed & tested by the community

:)

klidifia’s picture

Status: Reviewed & tested by the community » Fixed

Thank you -- is released in 1.0.0-alpha3

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.