Make WordPress Core

Opened 5 weeks ago

Closed 11 days ago

Last modified 7 days ago

#62680 closed defect (bug) (wontfix)

YouTube embed doesn't let me add a caption

Reported by: bikegremlin's profile bikegremlin Owned by:
Milestone: Priority: normal
Severity: normal Version: 6.7.1
Component: General Keywords: close
Focuses: Cc:

Description

When I add a YouTube video, in the backend/post editor (Gutenberg), I no longer get the option to add a caption for the video.

In old posts, I can open them for editing and edit the caption I had added before the WordPress 6.7.1 (I had skipped updating/testing the 6.7 version so maybe the bug was present there too, I don't know).

Change History (11)

#1 @sainathpoojary
5 weeks ago

Reproduction Report

Description

This report validates whether the issue can be reproduced.

Environment

  • WordPress: 6.7.1
  • PHP: 8.1.29
  • Server: nginx/1.16.0
  • Database: mysqli (Server: 8.0.16 / Client: mysqlnd 8.1.29)
  • Browser: Chrome 131.0.0.0
  • OS: macOS
  • Theme: Twenty Sixteen 3.4
  • MU Plugins: None activated
  • Plugins: None activated

Actual Results

✅ Error condition occurs.

Additional Notes

Additionally, I tested this on version 6.6.1 and was able to edit the caption successfully.

Supplemental Artifacts

https://utfs.io/f/PL8E4NiPUWyOfoZ9F14ctlDHSkwfNGujMUIyo2W4P7rqvbXB

#2 follow-ups: @abcd95
5 weeks ago

  • Keywords close added

Hey @bikegremlin, Thanks for bringing this up.

In version 6.6.2, I noticed that the caption option appears to be opened by default. Interestingly, when working with version 6.7 (and above), I found that I could successfully add captions using the caption icon.

Here's a screenshot for the same - https://i.postimg.cc/Y9sNNDPF/Screenshot-2024-12-12-at-09-59-57.png

Last edited 5 weeks ago by abcd95 (previous) (diff)

#3 follow-up: @usmandev000
5 weeks ago

WordPress may have changed how captions work in Gutenberg. To add one, insert a YouTube block for your video. Below it, add a Paragraph block for the caption. Style it with custom CSS by adding a class like video-caption. Customize the styling in your theme’s CSS file to make it look like traditional captions.

<?php
.video-caption {
    font-size: 0.9em;
    color: #666;
    text-align: center;
    margin-top: 5px;
}

#4 @usmandev000
5 weeks ago

Another one: If the caption option is missing, switch to a Custom HTML block. Add the video using the iframe embed code and include a caption below it. Example:

<div>
    <iframe src="your-video-url"></iframe>
    <p class="video-caption">Your Caption Here</p>
</div>

Add CSS for .video-caption to style it as needed.

#5 @usmandev000
5 weeks ago

At the last I think The issue might be a bug in WordPress 6.7.1. Consider rolling back to an earlier version of WordPress to restore caption functionality. Alternatively, use a plugin like Advanced Custom Fields (ACF) to create a custom field for captions and display them below your videos programmatically.

#6 in reply to: ↑ 3 @usmandev000
5 weeks ago

Replying to usmandev000:

WordPress may have changed how captions work in Gutenberg. To add one, insert a YouTube block for your video. Below it, add a Paragraph block for the caption. Style it with custom CSS by adding a class like video-caption. Customize the styling in your theme’s CSS file to make it look like traditional captions.

<?php
.video-caption {
    font-size: 0.9em;
    color: #666;
    text-align: center;
    margin-top: 5px;
}

Before trying this I think you should try this Here's a screenshot for the same - https://i.postimg.cc/Y9sNNDPF/Screenshot-2024-12-12-at-09-59-57.png
from @abcd95.

Last edited 4 weeks ago by usmandev000 (previous) (diff)

#7 in reply to: ↑ 2 ; follow-up: @bikegremlin
5 weeks ago

Hi,

Thank you for taking the time to help.
Yes, that works.
I managed to miss that button. My bad.

It's not very intuitive, but that's not the first (and probably not the last) change that behaved like that (i.e. that old users can't figure it out easily).

So, I'm not sure if this counts as a bug - maybe it was deliberately designed like that, to not leave the caption field open by default.

Replying to abcd95:

Hey @bikegremlin, Thanks for bringing this up.

In version 6.6.2, I noticed that the caption option appears to be opened by default. Interestingly, when working with version 6.7 (and above), I found that I could successfully add captions using the caption icon.

Here's a screenshot for the same - https://i.postimg.cc/Y9sNNDPF/Screenshot-2024-12-12-at-09-59-57.png

#8 in reply to: ↑ 7 @abcd95
5 weeks ago

Replying to bikegremlin:

I'm glad it worked out for you. We're continually working on making Gutenberg more intuitive and accessible for all users, and observations like yours are really helpful in that process.

Please feel free to reach out if you have any other questions!

#9 in reply to: ↑ 2 @davidtheplumber
3 weeks ago

Replying to abcd95:

Hey @bikegremlin, Thanks for bringing this up.

In version 6.6.2, I noticed that the caption option appears to be opened by default. Interestingly, when working with version 6.7 (and above), I found that I could successfully add captions using the caption icon.

Here's a screenshot for the same - https://i.postimg.cc/Y9sNNDPF/Screenshot-2024-12-12-at-09-59-57.png

Thanks, this ticket helped me a lot.

Version 2, edited 3 weeks ago by davidtheplumber (previous) (next) (diff)

#10 follow-up: @poena
11 days ago

  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed

The change to the caption option was made to make it possible to hide the caption in the editor, and
to improve the consistency with other blocks. There are no plans to revert the change.

Because of this, I am closing this ticket.

#11 in reply to: ↑ 10 @bikegremlin
11 days ago

Replying to poena:

The change to the caption option was made to make it possible to hide the caption in the editor, and
to improve the consistency with other blocks. There are no plans to revert the change.

Because of this, I am closing this ticket.

Note that the caption interface is still working the "old way" for pictures/images.

If consistency is the key, that's worth noting IMO - not sure if or when that will get overhauled.

Also - as a decade user of WP, the caption option for YT was not clear/obvious to me.

Maybe it's because the UI is not consistent, and if it gets consistent, such confusion would be avoided.

Note: See TracTickets for help on using tickets.