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

Media & text block: The featured image is output in the wrong place if the block has a nested Media & text block. #62023

Closed
carolinan opened this issue May 27, 2024 · 1 comment
Assignees
Labels
[Block] Media & Text Affects the Media & Text Block [Type] Bug An existing feature does not function as intended

Comments

@carolinan
Copy link
Contributor

Description

If you have a media & text block that:

  1. Has the featured image option enabled
  2. Has the media on the right
  3. Has a media & text block inside the content area

Then the featured image is printed in the wrong position in the markup on the front.
The markup that is supposed to be updated with the featured image prints and empty <img> tag.

Step-by-step reproduction instructions

  1. Activate Gutenberg trunk.
  2. Create a new post and add a featured image.
  3. Insert a media & text block.
  4. Enable the featured image.
  5. Enable the option to position the media on the right.
  6. Now insert another media & text block in the first media & text block. It doesn't matter if this block has any content or has a media selected.
  7. View the front of the website, and compare the result in the editor and front.
  8. View the source code to see if the outer media & text block also prints an empty <img> tag.

Screenshots, screen recording, code snippet

No response

Environment info

No response

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 carolinan added [Type] Bug An existing feature does not function as intended [Block] Media & Text Affects the Media & Text Block labels May 27, 2024
@carolinan carolinan self-assigned this May 27, 2024
@annezazu
Copy link
Contributor

Adding to 6.6 since this impacts a feature for the release (using featured image in media & text block)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Media & Text Affects the Media & Text Block [Type] Bug An existing feature does not function as intended
Projects
No open projects
Status: Done
Development

No branches or pull requests

2 participants