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

Duplicate meta box content on non-Gutenberg screens #5813

Closed
swissspidy opened this issue Mar 27, 2018 · 0 comments · Fixed by #5814
Closed

Duplicate meta box content on non-Gutenberg screens #5813

swissspidy opened this issue Mar 27, 2018 · 0 comments · Fixed by #5814

Comments

@swissspidy
Copy link
Member

Issue Overview

We're still using CMB on some projects and are working on migrating everything to Gutenberg.

Now we noticed that the meta boxes contain duplicate content on some post types Gutenberg isn't enabled for (mainly because they don't show up in the REST API). Every field is shown twice.

It has to do with #2804 and how Gutenberg tricks plugins into registering meta boxes to be used in the new editor.

However, this should not run when Gutenberg can't even be used for the current post or post type.

Steps to Reproduce (for bugs)

  1. Add some meta boxes to a
  2. Notice how meta box content is duplicated.

Expected Behavior

Gutenberg doesn't change anything when using the classic editor.

Current Behavior

The meta box content is duplicated.

Possible Solution

Add some gutenberg_can_edit_post() and gutenberg_can_edit_post_type() checks. PR imminent.

Screenshots / Video

Without Gutenberg:
screen shot 2018-03-27 at 10 08 09

With Gutenberg:
screen shot 2018-03-27 at 10 08 33

Related Issues and/or PRs

#2804

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant