Problem/Motivation

I try to add the link to a shorts video in youtube then

Steps to reproduce

When i try to save the node there appear error:

Could not find a video provider to handle the given URL.

Looks like the module dont recognize youtube videos with the URL

https://www.youtube.com/shorts/anyvideourl

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

koffer created an issue. See original summary.

koffer’s picture

I found a simple solution, if I change in URL the word shorts with a watch I can see a normal youtube player and embed the video in the field.

Jelle_S made their first commit to this issue’s fork.

jelle_s’s picture

Status: Active » Needs review

I created a merge request that adds support for shorts, but also adds support for the url format youtube.com/watch/<id>, where before only youtube.com/watch?v=<id> was supported.

sagesolutions’s picture

Status: Needs review » Reviewed & tested by the community

Applied patch and was able to enter YouTube shorts urls

astridp’s picture

Hi! I am facing the same issue with Drupal not finding a URL provider for youtube shorts videos and the suggested changes in the URL have not helped.
Could someone explain what applying patch means? Are there any other ways to deal with this issue?

Thanks!!

binnythomas’s picture

StatusFileSize
new1.18 KB

I am adding the changes found in the MR as a patch to be used by composer till it is merged.

jelle_s’s picture

@binnythomas To make your life easier in the future: you can add .diff at the end of the MR url to use it with composer as well (it will then automatically incorporate new changes made to the MR as well)

dabbor’s picture

Hi @Jelle_S,

it will then automatically incorporate new changes made to the MR as well

That is exactly why I asked Binny to add the patch in here as the use of the .diff as https://git.drupalcode.org/project/video_embed_field/-/merge_requests/4.... is from what I know considered unsafe as it might change as you've described.

Such a change might result in break of automated build or so in your CI system.

laura.gates’s picture

Status: Reviewed & tested by the community » Needs work

I don't this this patch works for drupal 10.1. It still applies an accepts the shorts url. However, it won't actually play the video - instead the player directs you to view the video on YouTube.

runzipel’s picture

you can try https://www.youtube.com/watch?v=xyz. xyz is the youtube video id which is the last part of the url. so you have to change https://www.youtube.com/shorts/xyz to https://www.youtube.com/watch?v=xyz. good luck

arthur.baghdasar’s picture

Status: Needs work » Reviewed & tested by the community

Works for me

arthur.baghdasar’s picture

StatusFileSize
new732 bytes
arthur.baghdasar’s picture

arthur.baghdasar’s picture

StatusFileSize
new187.56 KB

Updated the tests.

beloglazov91 made their first commit to this issue’s fork.

dabbor’s picture

I made a 3.x version of this issue: https://www.drupal.org/project/video_embed_field/issues/3509552 and just transfered MR and patch to be compatible with 3.x version.

mably’s picture

Fixed in 3.0.x-dev branch.

pfrenssen’s picture

Status: Reviewed & tested by the community » Patch (to be ported)

This has been fixed in the 3.0.x branch in #3509552: Support youtube shorts 3.x. Let's make sure to include the unit test from that fix here too.

md2’s picture

StatusFileSize
new720 bytes