Skip to content

Comments and Pingbacks get cleared out when a pattern is edited (within the editor) and a metabox is shown #61827

Description

@mlaetitia

Description

When editing a post, if we also edit a pattern from within the post, the comment_status and pingbacks get turned off.

This happens only (from my tests) when a metabox is added / showing on the editor (example: the custom fields metabox or the Yoast SEO one).

Step-by-step reproduction instructions

  1. Edit or create a post (Gutenberg)
  2. Make sure you have Custom Fields showing on the editor (hamburguer menu, preferences, advanced , custom fields)
  3. If there's no pattern on that post yet, create one (that syncs across posts)
  4. Make sure the posts and pingbacks are turned on.
  5. Edit the pattern and save it
  6. Head back to the Post editor. If you refresh the page here you'll notice that the comments and pingbacks are turned off. Same happens if instead of refreshing you just "Save Draft" or Update Post. This means somehting is happening in the backend and changing these fields without updating the UI (only when we get new data from the server, do those fields show as off).

Screenshots, screen recording, code snippet

Screen Capture on 2024-05-21 at 16-37-38

Environment info

This can be replicated with a fresh WordPress installation or WordPress playground without plugins installed.

This can't be replicated in older versions (before 6.5 - I think), seems the issue is present only when we edit the pattern on the post editor itself.

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

Metadata

Labels

Needs TestingNeeds further testing to be confirmed.[Feature] PatternsA collection of blocks that can be synced (previously reusable blocks) or unsynced[Status] In ProgressTracking issues with work in progress[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