[wp-trac] [WordPress Trac] #40774: Refine error message when embedding invalid Video (URL)
WordPress Trac
noreply at wordpress.org
Sat Jan 31 12:41:17 UTC 2026
#40774: Refine error message when embedding invalid Video (URL)
-------------------------------------------------+-------------------------
Reporter: Presskopp | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting
| Review
Component: Media | Version: 4.8
Severity: normal | Resolution:
Keywords: has-patch needs-refresh 2nd-opinion | Focuses:
-------------------------------------------------+-------------------------
Changes (by huzaifaalmesbah):
* keywords: has-patch needs-testing => has-patch needs-refresh 2nd-opinion
Comment:
== 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
1. Applied PR patch locally.
2. Navigated to Appearance → Widgets → Video Widget.
3. Clicked "Add Video" → "Insert from URL".
4. Tested multiple URLs:
- Valid public YouTube video
- Private YouTube video
- Invalid YouTube URL (wrong ID)
- Invalid Vimeo URL
- Non-video direct file URL
5. Compared behavior before and after applying the patch.
6. ❌ 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.''
--
Ticket URL: <https://core.trac.wordpress.org/ticket/40774#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list