Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Captions in media library and block editor are not synchronized #51425

Closed
pmlydon opened this issue Jun 12, 2023 · 4 comments
Closed

Captions in media library and block editor are not synchronized #51425

pmlydon opened this issue Jun 12, 2023 · 4 comments

Comments

@pmlydon
Copy link

pmlydon commented Jun 12, 2023

Description

Expected: Captions inserted or updated in the media library will display on images in the block editor, and likewise, captions entered in the block editor will display or update in the media library.
Actual: When dealing with images in block editor, there is no association between captions inputted in the media library and captions inputted in the block editor.

Step-by-step reproduction instructions

  1. Create a gallery of images with no captions in a post, and save.
  2. Navigate to Media > Library from the Wordpress UI.
  3. Enter a caption for one of the images within the gallery you just created, and save.
  4. Again open the post with the gallery containing the image. The caption is not there.

This behavior is the same when done the other way around:

  1. Within a post, insert a gallery of images
  2. Add a caption to one of the images
  3. Save the post. Verify that it displays on the live page.
  4. Navigate to the image in media library. The caption is not there.

I would categorize this as a bug, unless there is a specific reason for disassociating the caption fields.
However it is, the behavior is confusing for the user.

Screenshots, screen recording, code snippet

nbscomics2

Environment info

  • Wordpress 6.2.2 / Block editor
  • Gutenberg not installed
  • Issue in multiple browsers, multiple OS

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@carolinan
Copy link
Contributor

I believe this feature is built this way so that the same images can be used in different places with different captions. It is the same for alt texts.

@pmlydon pmlydon closed this as completed Jun 14, 2023
@pmlydon pmlydon reopened this Jun 14, 2023
@pmlydon
Copy link
Author

pmlydon commented Jun 14, 2023

Got it. Thanks Carolinan. I guess it makes sense in some scenarios.
I do wonder if there is more utility / consistency in keeping the captions synchronized? Or, at least, giving users an option for whether or not to sync. But if it's truly not a bug, then I suppose I might move this to a feature request.

@Mamaduka
Copy link
Member

I believe this feature is built this way so that the same images can be used in different places with different captions. It is the same for alt texts.

Yes, this is by design.

P.S. Here's more detail about the "alt-text" and I think similar could be applied to the captions. See #35095 (comment).

@pmlydon
Copy link
Author

pmlydon commented Jun 14, 2023

Yes, this is by design.

Great. I will consider this closed then.
Thank you both, for taking the time to explain and confirm.

@pmlydon pmlydon closed this as completed Jun 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants