Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vimeo: embed reversal fails with some vimeo URL formats #10529

Open
jeherve opened this issue Nov 2, 2018 · 27 comments · Fixed by #22115
Open

Vimeo: embed reversal fails with some vimeo URL formats #10529

jeherve opened this issue Nov 2, 2018 · 27 comments · Fixed by #22115
Assignees
Labels
Customer Report Issues or PRs that were reported via Happiness. aka "Happiness Request", or "User Report" [Feature] Shortcodes / Embeds [Pri] Normal [Type] Bug When a feature is broken and / or not performing as intended

Comments

@jeherve
Copy link
Member

jeherve commented Nov 2, 2018

Steps to reproduce the issue

  1. Make sure Jetpack's Shortcodes module is enabled on your site.
  2. Go to Posts > Add New and create a new post including the 3 following URLs, on separate lines:
https://vimeo.com/289091934/cd1f466bcc
https://vimeo.com/album/2838732/video/6342264
https://vimeo.com/6342264

All 3 URL formats do work and return an embed in the post editor, since they are valid URL formats and Core's oEmbed method handles them. However, on the frontend of your site only the third video will work: the 2 first ones will only return the following error:

<!-- vimeo error: not a vimeo video -->

We would need to update our embed reversal method to support those URLs as well.

@jeherve jeherve added [Type] Bug When a feature is broken and / or not performing as intended [Feature] Shortcodes / Embeds [Pri] Normal labels Nov 2, 2018
@kraftbj
Copy link
Contributor

kraftbj commented Nov 5, 2018

As mentioned in Slack, if Core handles all of the cases we're currently handling, we probably should just look to not override oEmbed. We can keep any iframe->shortcode or iframe->URL conversions though.

@jeherve
Copy link
Member Author

jeherve commented Nov 5, 2018

if Core handles all of the cases we're currently handling, we probably should just look to not override oEmbed.

As far as I can tell they do, and they also handle the cases above.

@kraftbj
Copy link
Contributor

kraftbj commented Nov 5, 2018

Kicked off a PR for the sake of testing. I would generally trust Core's long-term maintainability of oEmbed's that they support, so want to try first just removing our handler.

@stale
Copy link

stale bot commented May 5, 2019

This issue has been marked as stale. This happened because:

  • It has been inactive in the past 6 months.
  • It hasn’t been labeled `[Pri] Blocker`, `[Pri] High`.

No further action is needed. But it's worth checking if this ticket has clear reproduction steps and it is still reproducible. Feel free to close this issue if you think it's not valid anymore — if you do, please add a brief explanation.

@stale stale bot added the [Status] Stale label May 5, 2019
@JoshuaGoode
Copy link
Contributor

JoshuaGoode commented Jan 10, 2020

Encountered today on a WPCOM Business site with hosting features enabled.

Video shows in editor but you get <!-- vimeo error: not a vimeo video --> on the front-end.

Had to use a different URL such as https://player.vimeo.com/video/xxxxxx and/or the iframe code to resolve.

@stale stale bot removed the [Status] Stale label Jan 10, 2020
@druesome
Copy link
Contributor

druesome commented Apr 1, 2020

Another issue on an AT site.

Pasting a Vimeo URL into the block editor would automatically convert into a Vimeo block, but video won't show up on the front end unless the Shortcodes module is turned off. Pasting in the https://player.vimeo.com/video/xxxxxx format works in all cases, though, but has to be placed in an HTML block to show up.

@donalirl
Copy link

Just reminding myself to update the support doc if this gets fixed

https://github.com/Automattic/en.support-docs-content/issues/573

@druesome
Copy link
Contributor

Got another case on an AT site. Their private showcase only showed up in the front end when the shortcodes module was turned off.

@jamiepalatnik
Copy link

Noticed this on another site today, 24836304-hc

@matticbot matticbot added the Customer Report Issues or PRs that were reported via Happiness. aka "Happiness Request", or "User Report" label Oct 13, 2020
@oyadeyiseun
Copy link

Noticed this on another site today, 25275714-HC
Vimeo URL: https://vimeo.com/466336705/59eb8d81e3

@xpurichan
Copy link

Experienced in 12441064-hc

@kaitohm
Copy link

kaitohm commented Dec 3, 2020

Got another case of this here: 26070978-hc

Replacing the link structure with https://player.vimeo.com/video/xxxxxx worked.

@Greatdane
Copy link

Greatdane commented Sep 10, 2021

Had another case of this here; 31463133-hc
Follow up here; 4287210-zd-woothemes

Replacing the link structure with https://player.vimeo.com/video/xxxxxx also worked.

Note, I can consistently replicate this on an Atomic site.

@JoshuaGoode
Copy link
Contributor

JoshuaGoode commented Oct 23, 2021

Duplicate issue opened in Calypso:

Automattic/wp-calypso#57257

Workaround:

Deactivate Shortcodes module or use Custom HTML embeds.

Internal report and discussion:

p9F6qB-7AN-p2

4394244-zd-woothemes

@carladoria
Copy link

Also reported in 32373876-hc
They video they are trying to embed is https://vimeo.com/575378271/2dac1e2217
I haven't found a workaround for this since this is a simple site.
In a Vimeo test account, I noticed that Vimeo now asks to upgrade to Pro to access many configuration and privacy settings. The user of this chat doesn't have access to the video settings.

@JoshuaGoode
Copy link
Contributor

Encountered on 32528438-hc

User attempted to embed https://vimeo.com/470165945/df204ef0ec

As a workaround, deactivated Shortcode module for now.

@Robertght
Copy link

Another case in 4578587-zen

Deactivating the shortcodes module did the trick.

@edequalsawesome
Copy link

Also reported in 33102724-hc, will let the customer know to use the HTML block to embed the video.

@sharonlaker19
Copy link

+1 at 4626490-zen
Deactivating the shortcode module worked.

@sharonlaker19 sharonlaker19 reopened this Dec 21, 2021
@jeherve
Copy link
Member Author

jeherve commented Jan 3, 2022

closing this again, since the problem is fixed in the development version of the plugin. The fix will ship wit the next Jetpack release.

@jeherve jeherve closed this as completed Jan 3, 2022
@JoshuaGoode
Copy link
Contributor

JoshuaGoode commented Jan 26, 2022

@ash1eygrace encountered this again on a WPCOM Atomic hosted site today. Toggling off the shortcodes module was necessary to get the video to work.

Example

Page was using an embed block.

The video URL inserted following the https://vimeo.com/XXXXXXXXX format.

The editor successfully displayed a working preview of the video.

<!-- wp:embed {"url":"https://vimeo.com/XXXXXXXXX","type":"video","providerNameSlug":"vimeo","responsive":true,"className":"wp-embed-aspect-16-9 wp-has-aspect-ratio"} -->
<figure class="wp-block-embed is-type-video is-provider-vimeo wp-block-embed-vimeo wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
https://vimeo.com/XXXXXXXXX
</div></figure>
<!-- /wp:embed -->

The editor pulled in https://player.vimeo.com/video/XXXXXXXXX?h=xxxxxxxxxx&dnt=x&app_id=xxxxxx for the embed block's preview.

Frontend issues

On the frontend, the page attempts to load https://player.vimeo.com/video/XXXXXXXXX which 404 and displays the following.

Sorry
This video does not exist.

Screen Shot on 2022-01-26 at 17:05:13

Workaround

Deactivate the shortcodes Jetpack module.

Internal discussion: p1643233702053900/1643232361.051700-slack-C02E26A26CT

@JoshuaGoode JoshuaGoode reopened this Jan 26, 2022
@jeherve
Copy link
Member Author

jeherve commented Jan 28, 2022

@JoshuaGoode I can't seem to be able to reproduce the issue at the moment. The video in your example seems to be private, and I cannot embed it, whether I use Jetpack or not. Here is how it looks like when I do not use Jetpack:
Screenshot 2022-01-28 at 18 06 55

Was the video public yesterday? Any chance you can still reproduce the problem today?

@jeherve jeherve added [Status] Needs Author Reply We would need you to make some changes or provide some more details about your PR. Thank you! and removed [Status] In Progress labels Jan 28, 2022
@JoshuaGoode
Copy link
Contributor

@jeherve Looking closer, the videos from the recent report utilize domain restrictions on Vimeo's end so they can only be embedded on sites with designated domains.

The issue still occurs if we enable the shortcodes module.

@jeherve
Copy link
Member Author

jeherve commented Feb 3, 2022

That makes sense now, thanks for the extra details. It seems like we'll need to add a Referer header to such requests, as per Vimeo documentation:
https://developer.vimeo.com/api/oembed/videos

To get the complete response, including the private metadata, send the Referer header with the request, and set its value to the video's whitelisted domain.

@jeherve jeherve removed the [Status] Needs Author Reply We would need you to make some changes or provide some more details about your PR. Thank you! label Feb 3, 2022
@cuemarie
Copy link

cuemarie commented Mar 3, 2022

Not sure if this is the same, but I ran into a simple site today having issues embedding Vimeo as well, here: 138349-hc

What Didn't Work

  • Embedding the link in https://vimeo.com/XXXXXXXXX format resulted in just the link itself displaying on the front end.

What Did Work

  • Displaying the video using shortcode [vimeo XXXXXXXX]
  • Embedding the video using https://player.vimeo.com/video/xxxxxx format
  • Using Vimeo's iframe embed code in a Custom HTML Block

@zdenys
Copy link
Contributor

zdenys commented Mar 24, 2022

4886160-zd-woothemes. I suggested one of the workarounds from the above comment.

@aleone89
Copy link

aleone89 commented Jul 8, 2022

Another report here: https://wordpress.com/forums/topic/problem-z-osadzaniem-video-z-vimeo/

  • Simple site
  • This happened in FSE > index template
  • Switching index to the posts page in the customizer did not solve the issue
  • Embedding the video using https://player.vimeo.com/video/xxxxxx format also did not work
  • Embedding via shortcode and HTML did work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Customer Report Issues or PRs that were reported via Happiness. aka "Happiness Request", or "User Report" [Feature] Shortcodes / Embeds [Pri] Normal [Type] Bug When a feature is broken and / or not performing as intended
Projects
None yet