Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 300758

Non-admin unable to add oEmbed URL via Media Library widget

$
0
0

Problem/Motivation

In Drupal 10.3.2 or 10.3.3, while authoring a Media field referencing the Remote Video media type with the Media Library widget as a non-administrator, I'm unable to add a URL. This is true for both content types and taxonomy terms.

As an administrator, I can add a URL in this way.

As any role with permission to create Remote Video media, I can add a URL and create a media entity via /media/add/remote_video, then add it via the media library list in the widget. So there is currently a workaround.

In attempting to debug the issue, I noticed that in core/modules/media_library/src/Form/OEmbedForm.php, when I remove the #required attribute for the url field, I am able to select "Add" but the saved entity has an empty URL.

Steps to reproduce

1. Add field to content type or taxonomy:
Entity reference
Reference type: Media
Media type: Remote video (allowed providers: YouTube, Vimeo)

2. While logged in as a non-administrator, author content or taxonomy term. Select "Add media".

3. In the Media Library widget, enter a valid YouTube or Vimeo URL and select "Add".

4. The URL field becomes blank. Error messages related to required field missing value appear (see attached screenshot).

Proposed resolution

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet


Viewing all articles
Browse latest Browse all 300758

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>