Description
When a Site Editor template contains a wp:video block in the legacy VideoPress format (with guid and videoPressClassNames attributes), the Site Editor persistently shows "Review 1 change" on every page load — even after saving. Saving clears it temporarily, but it reappears on reload indefinitely.
Root Cause
On every Site Editor load, the Jetpack/VideoPress JavaScript runs a block transform against legacy wp:video blocks and calls editEntityRecord() on the template — flagging it as dirty. However, the resulting serialized content is byte-for-byte identical to what's already stored (confirmed via Network tab: PATCH payload matched server response exactly). The dirty state is created entirely client-side, with no actual change to persist.
Steps to Reproduce
- Open the Site Editor on a site with Jetpack/VideoPress active
- Edit any template via the Code Editor and insert the following legacy block:
<!-- wp:video {"id":1,"guid":"239t8ryY","videoPressClassNames":"wp-block-embed is-type-video is-provider-videopress","title":"Example Video"} -->
<figure class="wp-block-video wp-block-embed is-type-video is-provider-videopress"><div class="wp-block-embed__wrapper">
https://videopress.com/v/239t8ryY?resizeToParent=true&cover=true&preloadContent=metadata&useAverageColor=true
</div><figcaption><br></figcaption></figure>
<!-- /wp:video -->
- Save the template
- Reload the Site Editor
Expected: No unsaved changes indicator — nothing changed.
Actual: "Review 1 change" appears immediately on every reload.
Impact
This affects sites that have VideoPress videos embedded in templates using the legacy wp:video format (created by older versions of the plugin). Users are permanently shown a false unsaved changes prompt in the Site Editor with no way to dismiss it permanently. Confirmed on multiple customer sites.
Suggested Fix
Before calling editEntityRecord() during the block transform, compare the resulting serialized template content against the currently stored value. Only dispatch the edit if the content actually differs.
Description
When a Site Editor template contains a
wp:videoblock in the legacy VideoPress format (withguidandvideoPressClassNamesattributes), the Site Editor persistently shows "Review 1 change" on every page load — even after saving. Saving clears it temporarily, but it reappears on reload indefinitely.Root Cause
On every Site Editor load, the Jetpack/VideoPress JavaScript runs a block transform against legacy
wp:videoblocks and callseditEntityRecord()on the template — flagging it as dirty. However, the resulting serialized content is byte-for-byte identical to what's already stored (confirmed via Network tab: PATCH payload matched server response exactly). The dirty state is created entirely client-side, with no actual change to persist.Steps to Reproduce
Expected: No unsaved changes indicator — nothing changed.
Actual: "Review 1 change" appears immediately on every reload.
Impact
This affects sites that have VideoPress videos embedded in templates using the legacy
wp:videoformat (created by older versions of the plugin). Users are permanently shown a false unsaved changes prompt in the Site Editor with no way to dismiss it permanently. Confirmed on multiple customer sites.Suggested Fix
Before calling
editEntityRecord()during the block transform, compare the resulting serialized template content against the currently stored value. Only dispatch the edit if the content actually differs.