-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Closed
Labels
[Block] ImageAffects the Image BlockAffects the Image Block[Feature] PatternsA collection of blocks that can be synced (previously reusable blocks) or unsyncedA collection of blocks that can be synced (previously reusable blocks) or unsynced[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Description
Description
See the title and the steps to reproduce.
This seems to happen because the image block saved in the pattern doesn't have complete markup (because no image is set). The image block also dynamically renders nothing in its php render callback when it detects there's no image.
The server html replacement that pattern overrides uses can't reproduce block markup, so this causes a problem.
Step-by-step reproduction instructions
- Create a synced pattern that contains an image block (but don't add an image to the image block)
- Use the image block as a pattern override using the checkbox in the advanced section
- Save the pattern
- Create a new post, insert an instance of the pattern you just created
- Add an image to the image block in the pattern
- Preview the post
Expected: the image set in step 5 should render
Actual: the image doesn't render.
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
Metadata
Metadata
Assignees
Labels
[Block] ImageAffects the Image BlockAffects the Image Block[Feature] PatternsA collection of blocks that can be synced (previously reusable blocks) or unsyncedA collection of blocks that can be synced (previously reusable blocks) or unsynced[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended