Opened 9 years ago
Last modified 6 days ago
#40774 new enhancement
Refine error message when embedding invalid Video (URL)
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Awaiting Review | Priority: | normal |
| Severity: | normal | Version: | 4.8 |
| Component: | Media | Keywords: | has-patch needs-refresh 2nd-opinion |
| Focuses: | Cc: |
Description
like in #40771 you get the following error when your link is invalid:
Sorry, we can’t display the video file type selected. Please select a supported video file (...) or stream (YouTube or Vimeo) instead.
When posting an incomplete youtube link for example it's not the file type but a character wrong or missing.
I propose to change the error message like in the patch attached:
Sorry, either the selected file type is not supported or the video stream is invalid. Please make sure to select one of the following video file types (%1$s) or a valid stream (YouTube or Vimeo) instead.
Attachments (1)
Change History (9)
This ticket was mentioned in Slack in #core-media by presskopp. View the logs.
9 years ago
This ticket was mentioned in Slack in #core-media by presskopp. View the logs.
9 years ago
This ticket was mentioned in Slack in #core-media by presskopp. View the logs.
8 years ago
This ticket was mentioned in PR #9887 on WordPress/wordpress-develop by @abcd95.
5 months ago
#7
- Keywords needs-refresh removed
#8
@
6 days ago
- Keywords needs-refresh 2nd-opinion added; needs-testing removed
Patch Testing Report
Patch Tested: https://github.com/WordPress/wordpress-develop/pull/9887
Environment
- WordPress: 7.0-alpha-61215-src
- PHP: 8.2.30
- Server: nginx/1.29.4
- Database: mysqli (Server: 9.5.0 / Client: mysqlnd 8.2.30)
- Browser: Chrome 143.0.0.0
- OS: macOS
- Theme: Twenty Eleven 5.0
- MU Plugins: None activated
- Plugins:
- Classic Widgets 0.3
- Test Reports 1.2.1
Steps taken
- Applied PR patch locally.
- Navigated to Appearance → Widgets → Video Widget.
- Clicked "Add Video" → "Insert from URL".
- Tested multiple URLs:
- Valid public YouTube video
- Private YouTube video
- Invalid YouTube URL (wrong ID)
- Invalid Vimeo URL
- Non-video direct file URL
- Compared behavior before and after applying the patch.
- ❌ No visible change
Expected behavior based on PR
Specific, contextual error messages should display depending on the failure:
- Invalid URL → show validation message
- Private/restricted YouTube → show YouTube-specific message
- Missing file → show file not found message
- Network issue → show network error message
Instead, the widget always falls back to the same generic unsupported file type message.
Additional Notes
The same generic error message appears both before and after the patch:
"Sorry, the video at the supplied URL cannot be loaded. Please check that the URL is for a supported video file (.mp4, .m4v, .webm, .ogv, .flv) or stream (e.g. YouTube and Vimeo)."
The newly introduced error messages (invalid_url, youtube_error, vimeo_error, network_error, file_not_found) are not triggered or displayed in any tested scenarios.
This is good as an incremental improvement, and worth committing by itself IMO, but I think we can probably go a bit further here. What are the failure conditions we expect? For example: