Problem/Motivation

\Drupal\media_entity_brightcove\Plugin\MediaEntity\Type\BrightcoveVideo::thumbnail has to always return a valid file, otherwise you get exceptions like
Drupal\Core\Entity\EntityStorageException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'uri' cannot be null: INSERT INTO {file_managed} (uuid, langcode, uid, filename, uri, filemime, filesize, status, created, changed) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7, :db_insert_placeholder_8, :db_insert_placeholder_9); Array ( [:db_insert_placeholder_0] => 14b61c79-798c-4946-abb2-48f9c09b8e88 [:db_insert_placeholder_1] => en [:db_insert_placeholder_2] => 0 [:db_insert_placeholder_3] => [:db_insert_placeholder_4] => [:db_insert_placeholder_5] => [:db_insert_placeholder_6] => [:db_insert_placeholder_7] => 1 [:db_insert_placeholder_8] => 1500649202 [:db_insert_placeholder_9] => 1500649202 ) in Drupal\Core\Entity\Sql\SqlContentEntityStorage->save() (line 777 of /mnt/www/html/militarydev/docroot/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php).

Proposed resolution

Ensure there is always a default image.

Remaining tasks

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
#2 2896582-2.patch3.33 KBdawehner

Comments

dawehner created an issue. See original summary.

dawehner’s picture

Status: Active » Needs review
StatusFileSize
new3.33 KB
boobaa’s picture

Status: Needs review » Closed (won't fix)

The patch in #2820436: Integrate with media (now in core) works fine with latest stable core release, and that combo does not have this problem at all (if I understood everything correctly).