- Issue created by @cboyden
- πΊπΈUnited States cboyden
The problem is this code in MediaBulkZipUploadForm::processOneFile():
$violations = $media->validate(); if (\count($violations)) { \Drupal::service('messenger') ->addError(new TranslatableMarkup('Could not create media for %file: @messages', [ '%file' => $filename, '@messages' => \array_map(static function (ConstraintViolation $violation) { return $violation->getMessage(); }, \iterator_to_array($violations)), ])); return; }
You can't pass an array into a placeholder in a TranslatableMarkup object. The $violations variable is an array, and the data returned from the callback function is also an array. The code should either use only the first violation message, or concatenate the error messages.
I'll work on an MR for this.
- Merge request !8Issue #3544723: Fix Media validation messages causing fatal error β (Open) created by cboyden