Make WordPress Core

Opened 16 months ago

Last modified 15 months ago

#56024 new defect (bug)

Removing a caption's contents removes the image alignment

Reported by: eagleharborsolutions's profile eagleharborsolutions Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 6.0
Component: General Keywords:
Focuses: administration Cc:


To reproduce this bug: first, insert an aligned image with a caption in either the classic WYSIWYG or a classic WYSIWYG block. Next, hit backspace to delete the caption within the editor. The image appears to remain properly aligned in the editor, but once you save/publish, the alignment is lost.

Change History (3)

#1 @juhise
15 months ago

Hey @eagleharborsolutions

Thanks for reporting the issue. You are right removing the caption removes the image alignment too.

Test Report


  • WordPress 6.0
  • Chrome 102.0.5005.115
  • MacOS Monterey
  • Theme: Twenty Twenty two
  • Gutenberg Editor, Classic Block

Steps to test

  1. Add a classic block and add Media
  2. Add caption and alignment to image
  3. Publish the post, will appear as expected
  4. Now remove the caption and publish
  5. Aligmnet will reset to default

#2 follow-up: @omarelhawary
15 months ago

Hello @eagleharborsolutions,

Thanks for noticing this bug.

I was able to repoduce the issue in the same steps as @juhise already mentioned.

Please check the attached screenshots for clarification.


Image with Caption:

Caption Removed:

Last edited 15 months ago by omarelhawary (previous) (diff)

#3 in reply to: ↑ 2 @eagleharborsolutions
15 months ago

Yes, this is correct. Thanks for verifying.

Note: See TracTickets for help on using tickets.