alleyinteractive / alleyinteractive/wp-curate

Use of temporary attributes causes edits to block templates

未关闭
#454 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
PHP
星标
11
派生
3
PR 合并指标
30 天内没有已合并 PR

描述

### Description of the bug

The query block's `Edit` component relies on setting attributes that aren't defined by `block.json` and so aren't serialized with the block, including `validPosts`, `query`, and `queryId`.

When a query block appears in a block theme's template files and the template is rendered in the editor while editing a post, these attributes are set, causing the editor to report that the site's template files have been updated and need to be saved.

### Steps To Reproduce

1. Add a query block to a block theme template or template part.
2. Edit a post and select "Show template" from the preview dropdown menu.
3. Observe that the save button becomes enabled and prompts you to save changes to the block template.

### Additional Information

Image

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。