Skip to content

Synced patterns/Reusable blocks: exporting the theme breaks synced patterns #53806

@MaggieCabrera

Description

@MaggieCabrera

Description

If you build a theme using reusable blocks and then export the theme (both using the core functionality or Create Block theme plugin) the template exported will have the synced patterns as <!-- wp:block {"ref":62} /--> which will not work if you try to run the theme on a different environment. We should fix this, even if it's just resolving those refs into the referenced markup of the pattern upon exporting.

Step-by-step reproduction instructions

Create a synced pattern on one of the theme's templates.
Export the theme
Try installing that theme on a different environment, you will see what's on the screenshot below

Screenshots, screen recording, code snippet

Screenshot 2023-08-18 at 11 20 33

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

No one assigned

    Labels

    [Feature] Synced PatternsRelated to synced patterns (formerly reusable blocks)[Feature] ThemesQuestions or issues with incorporating or styling blocks in a theme.[Type] BugAn existing feature does not function as intended

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions