Skip to content

Block Context Not Always Passed down through template parts in the site editor #49073

Open
@tomjn

Description

Description

While trying to work around #49072 I placed a template part inside a post template block so that I could reuse a post template like this:

Screenshot 2023-03-15 at 10 15 12

This works on the frontend, but it does not work in the site editor.

The resulting posts did not inherit block context and instead of a list of posts matching the query block, I saw a single post showing generic post placeholder blocks

Step-by-step reproduction instructions

Create a query block with post titles, etc, and then turn the descendants of the post template block into a template part ( but not the post template block itself, just its children )

Screenshots, screen recording, code snippet

No response

Environment info

WordPress 6.1

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

Assignees

No one assigned

    Labels

    [Block] Template PartAffects the Template Parts Block[Feature] Block APIAPI that allows to express the block paradigm.[Type] BugAn existing feature does not function as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions