Problem/Motivation
\Drupal\media\Entity\Media::getName() can return NULL if $media_source->getMetadata($this, $media_source->getPluginDefinition()['default_name_metadata_attribute']) returns NULL.
Steps to reproduce
Use the https://www.drupal.org/project/media_entity_instagram module. Link to an instragram with the media system, then delete the instragram. BOOM you'll get an error when trying to edit the media item because Html::escape() does not accept a NULL
Proposed resolution
Fallback to a label based on the media ID and a message about it being broken.
Remaining tasks
User interface changes
Introduced terminology
API changes
Data model changes
Release notes snippet
Issue fork drupal-3593548
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments