Make WordPress Core

Opened 5 years ago

Last modified 9 days ago

#51929 new defect (bug)

Video links on Attachment pages

Reported by: ravipatel's profile ravipatel Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version: 5.6
Component: Media Keywords: has-patch dev-feedback has-test-info
Focuses: ui, css Cc:

Description

1) When i have click on this link.
https://prnt.sc/vvcm0w
2) Show me just a link then video, Also content width issue.
https://prnt.sc/vvclat

Attachments (3)

2021-unsupported-video-link.png (21.9 KB) - added by sabernhardt 5 years ago.
Twenty Twenty-One: unsupported video link on attachment page
2020-unsupported-video-link.png (31.8 KB) - added by sabernhardt 5 years ago.
Twenty Twenty: unsupported video link on attachment page
51929.diff (632 bytes) - added by sabernhardt 4 years ago.
wrapping unsupported video link with paragraph tag

Download all attachments as: .zip

Change History (13)

This ticket was mentioned in Slack in #core-css by ravi. View the logs.


5 years ago

#3 @sabernhardt
5 years ago

  • Component changed from Media to Bundled Theme
  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to Future Release
  • Summary changed from Twenty Twenty-One : Attchment page - Video to Twenty Twenty-One: Video link on Attachment page
  • Version trunk deleted

The video does not show because the .mov format lacks support.
Default supported video formats are mp4, m4v, webm, ogv, and (currently) flv.

For the Twenty Twenty-One theme (and Twenty Twenty), the link is not centered like most content because it's only the link inside the entry-content. The link has no block element to be its container, where the max-width and auto margins would apply.

@sabernhardt
5 years ago

Twenty Twenty-One: unsupported video link on attachment page

@sabernhardt
5 years ago

Twenty Twenty: unsupported video link on attachment page

This ticket was mentioned in Slack in #core-media by ravi. View the logs.


5 years ago

This ticket was mentioned in Slack in #core-css by ravi. View the logs.


5 years ago

#6 @ravipatel
4 years ago

Code solutions

function custom_wp_video_extensions($types){
    $types[] = 'mov';
    return $types;
}
add_filter('wp_video_extensions','custom_wp_video_extensions');

Can we add default format list in wordpress or not?

function wp_get_video_extensions(){}

\wp-includes\media.php

#7 @desrosj
4 years ago

  • Version set to 5.6

@sabernhardt
4 years ago

wrapping unsupported video link with paragraph tag

#8 @sabernhardt
4 years ago

  • Component changed from Bundled Theme to Media
  • Keywords has-patch needs-testing added; needs-patch removed
  • Summary changed from Twenty Twenty-One: Video link on Attachment page to Video links on Attachment pages

Interestingly, the block editor does allow embedding MOV files, and they play for me in Windows browsers (Firefox, Chrome, Edge-Chromium, IE11). So it's not consistent within WordPress.

I still recommend converting video files to MP4 rather than using the filter to allow a less-supported format on individual sites.

For the issue of how the unsupported media links display on attachment pages, I'd prefer to address the link itself instead of theme-by-theme edits (returning ticket to the Media component). Would wrapping the link in a paragraph tag be acceptable? Twenty Twenty and Twenty Twenty-One would center the paragraph (with margins, not text-align).

Last edited 4 years ago by sabernhardt (previous) (diff)

#9 @hmbashar
10 days ago

Test Report

Description

This report validates whether the indicated patch works as expected.

Patch tested: 51929.diff

Environment

  • WordPress: 6.9-alpha-60093-src
  • PHP: 8.2.28
  • Server: nginx/1.25.4
  • Database: mysqli (Server: 8.0.41 / Client: mysqlnd 8.2.28)
  • Browser: Chrome 136.0.0.0
  • OS: macOS
  • Theme: Twenty Twenty-Five 1.2
  • MU Plugins: None activated
  • Plugins:
    • Test Reports 1.2.0

Actual Results

  1. ✅ Issue resolved with patch.

Additional Notes

After updating the patch, clicking the 'View media file' button now plays the video perfectly without redirecting to a page that shows the URL as content. It now displays as expected.

https://i.ibb.co/DP0xZdSH/Screenshot-at-Jun-03-2-22-07-AM.png

Last edited 10 days ago by hmbashar (previous) (diff)

#10 @SirLouen
9 days ago

  • Keywords dev-feedback has-test-info added; needs-testing removed

Test Report

Description

🟠 This report partially validates that the indicated patch works as expected.

Patch tested: https://core.trac.wordpress.org/attachment/ticket/51929/51929.diff

Environment

  • WordPress: 6.9-alpha-60093-src
  • PHP: 8.2.28
  • Server: nginx/1.27.5
  • Database: mysqli (Server: 8.4.5 / Client: mysqlnd 8.2.28)
  • Browser: Chrome 137.0.0.0
  • OS: Windows 10/11
  • Theme: Twenty Twenty 2.9
  • MU Plugins: None activated
  • Plugins:
    • Test Reports 1.2.0

Testing Instructions

  1. First enable attachment pages in /wp-admin/options.php > wp_attachment_pages_enabled
  2. Add a video. It has to be an unsupported video file like a MOV file.
  3. Go to Media Library and set the GRID VIEW (yes, this is something that always blows my mind and wastes 15 minutes of my life)
  4. Click in the video > View Attachment Page. This is technically the same as just editing the video and clicking on the Permalink, but for some reason some people like using the "View Attachment Page" route
  5. 🐞 No video appears but a link, and it's not centered (Using my setup, 2020 theme, have not tested all themes)

Expected Results

  1. 🟠 For the OP, he was expecting MOV to show up despite being a unsupported video format
  2. There is another issue, the centering that has to be solved.

Actual Results

  1. 🟠 Unsupported video file showing is not solved
  2. ✅ Centering resolved with patch.
Note: See TracTickets for help on using tickets.