WidgetValidation triggered when switching to core media library browser tab

Created on 25 March 2020, almost 5 years ago
Updated 10 May 2024, 9 months ago

We have a fairly straight forward entity browser configured that has the the Entity Form on the first tab and a media library view on the second one. When we switch from the entity form tab to the view tab it throws the following error:

TypeError: Argument 1 passed to file_validate() must implement interface Drupal\file\FileInterface, instance of Drupal\media\Entity\Media given, called in entity_browser/src/Plugin/EntityBrowser/WidgetValidation/File.php on line 34 in file_validate() (line 323 of core/modules/file/file.module).

It seems like clicking off the form to the other tab triggers the validation logic on the entity form, but because nothing has been added to that form it results in the above.

πŸ› Bug report
Status

Needs review

Version

2.0

Component

Widget plugins

Created by

πŸ‡ΊπŸ‡ΈUnited States DamienMcKenna NH, USA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024