For Vimeo videos in format vimeo.com/ABC/123, the popup should be https://player.vimeo.com/video/ABC?h=123, not https://player.vimeo.com/video/ABC

Created on 17 March 2022, almost 3 years ago
Updated 20 May 2024, 7 months ago

Posting this to save others time troubleshooting this issue.
Problem: A new embedded video does not display and a "Sorry This video does not exist message" is displayed.
Cause: For additional security, Vimeo has introduced a new privacy hash into the embed code of unlisted videos going forward. The player link will not function without the additional code.

New videos added with Unlisted Privacy Mode have a URL in the format vimeo.com/68929939X/4ccd803f3X
Vimeo appears to have implemented this so that videos previously set with Unlisted Privacy Mode still display OK.
Videos set to other privacy modes still display OK, so the Hide from Vimeo mode may be a usable alternative in low security requirement situations.

โœจ Feature request
Status

RTBC

Version

2.0

Component

Code

Created by

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.

  • ๐Ÿ‡จ๐Ÿ‡ฆCanada alberto56

    A little more on this issue:

    • First, I have updated the version to 8.x-2.x-dev because it might be preferable to fix this in the latest branch, and then backport to the 7 branch later on.
    • I have moved this from support request to feature request because it seems to be a missing feature

    Here is the problem:

    Example of a listed public Vimeo video which can be embedded

    Let's say you have the video https://vimeo.com/453364499, which is a listed public Vimeo video, and you enter that in a video embed field, the resulting popup will be https://player.vimeo.com/video/453364499, which works fine.

    Example of a unlisted public Vimeo video which can be embedded

    Let's say you have an unlisted public video https://vimeo.com/881819838/e5f1e11b86, and you enter that in a video embed field, the resulting popup will be https://player.vimeo.com/video/881819838

    This embedded URL will show "Sorry, Weโ€™re having a little trouble."

    For this to work properly, we need to have the popup field being https://player.vimeo.com/video/881819838?h=e5f1e11b86

    Remaining task

    For Vimeo videos in format vimeo.com/ABC/123, the popup should be https://player.vimeo.com/video/ABC?h=123, not https://player.vimeo.com/video/ABC

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia FlutterStack

    Kindly review this patch. thank you

  • Open in Jenkins โ†’ Open on Drupal.org โ†’
    Core: 9.5.x + Environment: PHP 7.3 & MySQL 5.6
    last update 7 months ago
    run-tests.sh fatal error
  • Status changed to Needs review 7 months ago
  • ๐Ÿ‡จ๐Ÿ‡ฆCanada alberto56

    @FlutterStack thanks for the patch!

    May I recommend putting the comment number along with the patch name? The reason is that you have you have two links called "3270201-vimeo-unlisted-videos-iframe-url-issue-fix.patch", and the patch in comment 4 leads to https://www.drupal.org/files/issues/2024-05-19/3270201-vimeo-unlisted-vi... โ†’ , and the patch in comment 5 leads to https://www.drupal.org/files/issues/2024-05-19/3270201-vimeo-unlisted-vi... โ†’ , which are slightly different.

    I tested the patch in #5, above, by doing the following:

    * Video https://vimeo.com/870790749/127317b755, which is known at the time of this writing to be public unlisted, works fine, shows a preview, and the popup works.
    * Video https://vimeo.com/453364499, which is known at the time of this writing to be public and listed, works fine, shows a preview, and the popup works.

    I did not run review automated test results because when I go to https://www.drupal.org/node/1243930/qa โ†’ , it says "No DrupalCI testing schedules can be added or updated". And the link "View GitLab CI pipelines for this project" goes to https://git.drupalcode.org/project/video_embed_field/-/pipelines which says "This project is not currently set up to run pipelines."

    I did run:

    php core/scripts/run-tests.sh --module video_embed_field --sqlite /tmpfs/test.sqlite --url http://webserver/ --dburl mysql://root:drupal@mysql:3306/drupal --verbose
    

    with and without this patch, and I'm getting failures such as:

    Drupal\Tests\video_embed_field\FunctionalJavascript\Colorbox   0 passes   1 fails  
    

    So I assume I'm not running the tests correctly. If someone can give me instructions on how to run automated tests locally, I will be able to confirm whether all tests pass with this patch applied.

    I will leave this at "needs review" until we can ascertain that all automated tests (including the newly introduced ones) are passing with and without the patch.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia FlutterStack

    @alberto56, thank you for the review and recommendation.

    Patch #4 is hidden. In the future, I will attach the comment number to the patch name.

    For Patch #4, I clicked on the 'Add test/retest' link. It has set up an environment with PHP 7.3 & MySQL 5.6 for 8.x-2.x, and D9.5.

    However, we encountered a fatal error while running the run-tests.sh script. You can view the details here: https://www.drupal.org/pift-ci-job/2896551 โ†’ . The error is a warning in Drupal 10.6.

    My local setup includes PHP 8.2.18 and Drupal 10.6. Below are the commands to set up the testing environment:

    Run these commands in your Drupal project's root folder to set up the environment:

    $ composer require --dev drupal/core-dev
    $ composer require --dev phpunit/phpunit
    

    To execute the test cases, run the following command:

    $ vendor/bin/phpunit -c web/core/phpunit.xml.dist web/modules/contrib/video_embed_field/tests/src/Unit/
    

    Try this steps for after applying patch#5.

  • Status changed to RTBC 7 months ago
  • ๐Ÿ‡จ๐Ÿ‡ฆCanada alberto56

    Thanks for the quick reply @FlutterStack

    I have tested everything locally using that technique and tests are passing:

    Testing /var/www/docroot/modules/contrib/video_embed_field/tests/src/Unit
    ..........................................................        58 / 58 (100%)
    

    Based on that, I am setting this to RTBC.

Production build 0.71.5 2024