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
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | entity_usage_validate-incorrect-field-ref-3355512-3.patch | 606 bytes | ericgsmith |
| #2 | entity_usage_validate-incorrect-field-ref-3355512-2.patch | 621 bytes | ericgsmith |
Comments
Comment #2
ericgsmith commentedComment #3
ericgsmith commentedSeems alpha tags are ahead of dev branch? https://git.drupalcode.org/project/entity_usage_validate/-/compare/1.0.x...
Patch against alpha 2
Comment #5
klidifia commented:)
Comment #6
klidifia commentedThank you -- is released in 1.0.0-alpha3