alleyinteractive / alleyinteractive/wp-curate

Use of temporary attributes causes edits to block templates

Đang mở
#454 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
PHP
Star
11
Fork
3
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

### 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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.