alleyinteractive / alleyinteractive/wp-curate

Use of temporary attributes causes edits to block templates

Offen
#454 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
PHP
Sterne
11
Forks
3
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.