Automattic / jetpack

Security, performance, marketing, and design tools — Jetpack is made by WordPress experts to make WP sites safer and faster, and help you grow your traffic.
https://jetpack.com/
Other
1.59k stars 798 forks source link

"Invalid VideoPress URL" when using Insert From URL on WordPress.com sites #34741

Open chrisfromthelc opened 9 months ago

chrisfromthelc commented 9 months ago

Impacted plugin

VideoPress

Quick summary

When attempting to paste a previously-uploaded video link from the WordPress.com Media library, into the Insert From URL box on the VideoPress block, the error Invalid VideoPress URL is triggered.

Steps to reproduce

You'll need to create or use a WordPress.com site with an appropriate plan for the VideoPress block.

  1. Upload a video to the Media Library directly.
  2. Create a new post or page.
  3. Insert a VideoPress block. Click the Insert From URL link and paste the video's link and submit.

The Invalid VideoPress URL should trigger at the point with the Try Again and Cancel buttons showing.

A clear and concise description of what you expected to happen.

VideoPress URLs ultimately use the video's GUID and/or link to determine if it can be directly used.

If we look at the URLs listed here, it suggests that there isn't an issue with using files from a wordpress.com domain. However, it doesn't appear that the regex used appropriately handle simple site URLs, such as https://test51825.files.wordpress.com/2023/12/mp4-version.m4v

We can see from the API response that there is in fact a video URL for the video that is purported to work, https://videos.files.wordpress.com/xyUGnqUw/mp4-version.m4v. Although it wouldn't be as straightforward as using a URL with a GUID, it should be possible to get that information, so that we could allow the sitename.files.wordpress.com URLs to be used without failing.

What actually happened

The Invalid VideoPress URL shows with the Try Again and Cancel buttons showing.

Impact

All

Available workarounds?

Yes, easy to implement

Platform (Simple and/or Atomic)

Simple

Logs or notes

No response

github-actions[bot] commented 3 months ago

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

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.