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

Inserting images with captions doesn't populate the image block caption and produces invalid block content #10597

Closed
afercia opened this issue Oct 14, 2018 · 1 comment
Assignees
Labels
[Type] Bug An existing feature does not function as intended [Type] Regression Related to a regression in the latest release
Milestone

Comments

@afercia
Copy link
Contributor

afercia commented Oct 14, 2018

See (maybe) related #10594

On current master 4.0.0-rc.1:

  • create a new post
  • add an image block
  • insert from the media library an image that already has a caption
  • I'd expect the Image block caption to be populated with the caption text from the inserted image
  • instead, the caption is empty:

screen shot 2018-10-14 at 17 04 00

  • save the post as draft
  • refresh the page
  • the block now warns about invalid content:

screen shot 2018-10-14 at 17 04 38

I've tested also in Gutenberg 3.5 and the caption was populated correctly, so it appears to be a regression.

Changing the source from rich-text to html in processMediaCaption() as mentioned in #10594 makes the caption work again:

screen shot 2018-10-14 at 16 54 24

but I guess it's not a proper solution because:

  • the caption placeholder doesn't disappear and it overlaps with the caption text
  • after saving and refreshing the post, the "invalid content" warning still appears
@afercia afercia added [Type] Bug An existing feature does not function as intended [Type] Regression Related to a regression in the latest release labels Oct 14, 2018
@danielbachhuber danielbachhuber added this to the 4.1 milestone Oct 15, 2018
@youknowriad youknowriad modified the milestones: 4.1 - UI freeze, 4.0 Oct 16, 2018
@youknowriad youknowriad self-assigned this Oct 16, 2018
@ellatrix
Copy link
Member

Fixed by #10532.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Bug An existing feature does not function as intended [Type] Regression Related to a regression in the latest release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants