Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
mlaetitia opened this issue May 21, 2024 · 1 comment · Fixed by #62507
Assignees
Labels
[Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced Needs Testing Needs further testing to be confirmed. [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@mlaetitia
Copy link

mlaetitia commented May 21, 2024

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

@mlaetitia mlaetitia added the [Type] Bug An existing feature does not function as intended label May 21, 2024
@jordesign jordesign added Needs Testing Needs further testing to be confirmed. [Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced labels May 24, 2024
@marcarmengou
Copy link

Reproduction Report

This report validates that the issue can be reproduced.

Environment

  • OS: Windows 10
  • Web Server: Nginx
  • PHP: 8.1
  • WordPress: 6.5.3
  • Browser: Chrome 125.0

Actual Results

  • ✅ Error condition occurs (reproduced).

Additional Notes

  • If you try to play it without activating "Custom Fields" within Preferences, the problem does not occur.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced Needs Testing Needs further testing to be confirmed. [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants