Opened 5 weeks ago
Closed 3 weeks ago
#63471 closed defect (bug) (fixed)
Remove IE Compat scripts from Media element scripting
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 6.9 | Priority: | normal |
Severity: | normal | Version: | 3.6 |
Component: | Media | Keywords: | good-first-bug has-patch |
Focuses: | Cc: |
Description
WordPress injects scripts to create elements if the user is on IE less than 9 in wp_playlist_scripts()
, wp_audio_shortcode()
, and wp_video_shortcode()
.
It's time to remove these.
See #24902.
Change History (8)
This ticket was mentioned in PR #8825 on WordPress/wordpress-develop by @aslamdoctor.
5 weeks ago
#1
- Keywords has-patch added
@mindctrl commented on PR #8825:
5 weeks ago
#3
The phpunit tests need to be updated to stop looking for the conditional IE addition. For example: https://github.com/WordPress/wordpress-develop/blob/8c011572459ef6353182f444f86adf244833f902/tests/phpunit/tests/media.php#L1002
@aslamdoctor commented on PR #8825:
5 weeks ago
#4
Thanks @mindctrl
It is done now 🙂
#5
@
3 weeks ago
Test Report
Description
This report validates whether the indicated patch works as expected.
Patch tested: https://github.com/WordPress/wordpress-develop/pull/8825.diff
Environment
- WordPress: 6.9-alpha-20250522.140828
- PHP: 7.4.31-dev
- Server: PHP.wasm
- Database: WP_SQLite_Driver (Server: 5.5 / Client: 3.40.1)
- Browser: Chrome 137.0.0.0
- OS: Windows 10/11
- Theme: Twenty Twenty-Five 1.2
- MU Plugins: None activated
- Plugins:
- Test Reports 1.2.0
Actual Results
- ✅ Issue resolved with patch.
Additional Notes
We reproduced the error by adding a shortcode block to the site with the following code:
[video src="https://example.com/video.mp4" poster="https://example.com/poster.jpg" width="800" height="450" autoplay="true"]
With this shortcode on the site, the elements tab in the devtools shows:
<!--[if lt IE 9]><script>document.createElement('video');</script><![endif]-->
When doing the same thing on the playground generated from the PR, this comment is not present which is the goal of the PR
Supplemental Artifacts
Add Inline:
or
Add as Attachment
Trac ticket: https://core.trac.wordpress.org/ticket/63471