Access denied to Remote video in content if oEmbed value in display mode is empty

Created on 25 January 2023, over 2 years ago
Updated 9 November 2023, over 1 year ago

Problem/Motivation

Users can set the maximum width and height of an embedded Remote Video in its display mode configuration. This configuration defaults to "0" pixels but users can remove this value and leave the field empty. Then the original website with an "Access denied" error is embeded instead of the viedeo.

Leaving a maximum width or height empty is a normal pattern in site building: either if the user doesn't want to limit the size, or if only one of the values needs to be restricted.
In the configuration for media type display mode, the value for the maximum height is either "0" (working correctly) or "NULL" (broken).

(Also, site builders have come to learn that "0" often means "unlimited", but it's not the best usability to have to assume so.)


Maximum width: "0px"


Maximum width: " px" (empty)

Steps to reproduce

  • Enable Media and Media Library modules
  • Create an Entity Reference: Media field for one of the content types, and select "Remote Video" as media type
  • Add a node with a link to a remote video one Youtube or Vimeo: The video should appear correctly embedded on the node page
  • Go to the default display mode of the Remote Video media type
  • Change the settings for the Remote video URL by deleting the "0" for Maximum height - leaving that field empty. Click Update and Save
  • Return to the node page: Instead of the video, you now see your website with an "Access denied" error

Proposed resolution

In order of desirability from a sitebuilders perspective:

  • Leave the maximum height and width empty by default, because that makes more sense for a sitebuilder. Then treat "NULL" the same as "0".
  • Allow the field to be empty, but treat "NULL" the same as "0" and add a description text that that "A maximum of 0px means that the height or width is not restricted."
  • If the field can not be left empty, then don't allow users to updated the configuration or save the display mode.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

✨ Feature request
Status

Active

Version

11.0 πŸ”₯

Component
MediaΒ  β†’

Last updated about 11 hours ago

Created by

πŸ‡³πŸ‡±Netherlands ifrik

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

Comments & Activities

Production build 0.71.5 2024