Remote media does not validate provider

Created on 6 March 2020, almost 5 years ago
Updated 11 September 2024, 3 months ago

Steps to reproduce

  1. Create a media entity type with a remote video
  2. Try to add a URL with an OEmbed provider not listed at https://oembed.com/providers.json

Expected result

There should be an error message that the URL is not valid

Actual result

Unhandled exception:
InvalidArgumentException: Unknown provider 'LittleThings' in Drupal\media\OEmbed\ProviderRepository->get() (line 117 of /var/www/core/modules/media/src/OEmbed/ProviderRepository.php).

🐛 Bug report
Status

Needs work

Version

11.0 🔥

Component
Media 

Last updated about 15 hours ago

Created by

🇬🇧United Kingdom malcomio

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.

  • 🇮🇳India samit.310@gmail.com

    Hello,

    Looks like this ticket is not relevant for Drupal 11, not able to reproduce it with Drupal 11.x. Please provide the steps to reproduce it with Drupal 11.

    As i am checking the code the getProviderByUrl in core/modules/media/src/OEmbed/UrlResolver.php and
    fetchResource in core/modules/media/src/OEmbed/ResourceFetcher.php validate it with core/modules/media/src/Plugin/Validation/Constraint/OEmbedResourceConstraintValidator.php.

    Thanks
    Samit K.

Production build 0.71.5 2024