Wp-calypso: Gutenberg: Can't save Image blocks without captions

Created on 26 Oct 2018  路  4Comments  路  Source: Automattic/wp-calypso

Steps to reproduce

  1. Starting at URL: http://calypso.localhost:3000/gutenberg/post/
  2. Add an Image block and insert an image without caption.
  3. Save and reload.

What I expected

The Image block show up without errors.

What happened instead

The Image block fails to validate because it has a (empty) <figcaption> element, that's not supposed to be added when there is no caption.

[Goal] Gutenberg [Type] Bug

All 4 comments

UPDATE
This only happens when inserting an image without caption (both from the media library and by uploading), and then not touching the caption.

On the other hand, updating the caption (e.g. type in something and then delete it), fixes the issue.

UPDATE 2
This doesn't seem to happen on #28000.
Maybe there are inconsistencies in the current Guten packages versions?

@vindl any reasons why that PR is blocked? How can we move it forward?

@vindl any reasons why that PR is blocked? How can we move it forward?

This PR is on hold until new version of components package, that contains WordPress/gutenberg#10943 fix, is published.

After landing #28000 I can no longer reproduce this in wpcalypso.

Was this page helpful?
0 / 5 - 0 ratings