Make WordPress Core

Opened 3 years ago

Last modified 2 years ago

#54924 new defect (bug)

Issues embedding Vimeo URLs with signatures

Reported by: elpix's profile elpix Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version: 5.9
Component: Embeds Keywords: has-testing-info needs-patch
Focuses: ui Cc:

Description

Hi,
The [video] shortcode is not working with the new vimeo url format (containing signature as paramter).
Example : [video data-width="500" data-height="281" controls="" src="https://player.vimeo.com/progressive_redirect/playback/667848247/rendition/1080p/1080p.mp4?loc=external&signature=f059d7229d1c838389dc3cc145b2072e2b8c18439b26aeaba0c55658a2837d7e" eq-attached="true"]L’option pour l’IS des entrepreneurs individuelsvideo

WP remove all the parameters, so the video code integration is not the good one.

Change History (7)

This ticket was mentioned in Slack in #core-test by hellofromtonya. View the logs.


3 years ago

#2 @Boniu91
3 years ago

  • Keywords has-testing-info reporter-feedback added

Hello @elpix thank you for creating the ticket. Could you tell me if it ever worked? If so, on which version?

I was able to reproduce it on many previous versions of WordPress, it's not related to 5.9.

Test Report

Env

  • WordPress 5.9, 5.8, 5.7
  • Windows 10
  • Theme: Twenty Twenty One

Steps to test

  1. Add a new page
  2. add a new shortcode [video data-width="500" data-height="281" controls="" src="https://vimeo.com/347119375?loc=external&signature=f059d7229d1c838389dc3cc145b2072e2b8c18439b26aeaba0c55658a2837d7e" eq-attached="true"]
  3. Publish the page
  4. Check the source, the signature parameter is removed

#3 @vijayhardaha
3 years ago

after 4.8 or 4.9 changes were made due to some issue with ME.js, details are available here
https://core.trac.wordpress.org/ticket/40866

<?php
// Remove all query arguments and force SSL - see #40866.
$parsed_vimeo_url = wp_parse_url( $atts['src'] );
$vimeo_src        = 'https://' . $parsed_vimeo_url['host'] . $parsed_vimeo_url['path'];

// Add loop param for mejs bug - see #40977, not needed after #39686.
$loop        = $atts['loop'] ? '1' : '0';
$atts['src'] = add_query_arg( 'loop', $loop, $vimeo_src );

This part of the code changes the src of vimeo urls.

#4 @elpix
3 years ago

The fix could be : "If there are no parameters in the vimeo url => do the code"

#5 @audrasjb
2 years ago

  • Keywords needs-patch added; reporter-feedback removed

#6 @swissspidy
2 years ago

  • Severity changed from critical to normal
  • Summary changed from [video] shortcode with vimeo url to Issues embedding Vimeo URLs with signatures

Briefly discussed this with @ruudjoyo during WCEU contributor day last week.

The aforementioned loop param workaround should be safe to remove now.

There was another param though that also caused a conflict with the signature.

Ideally we add tests to prevent regressions for these URLs in the future.

#7 @swissspidy
2 years ago

  • Milestone changed from Awaiting Review to Future Release
Note: See TracTickets for help on using tickets.