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

Hidden metaboxes bug #9232

Merged
merged 1 commit into from Aug 22, 2018

Conversation

Projects
None yet
2 participants
@pglewis
Contributor

pglewis commented Aug 22, 2018

Description

The checks against gutenberg_can_edit_post() and gutenberg_can_edit_post_type() may bail out of gutenberg_collect_meta_box_data() early. This can result in all hidden metaboxes being displayed in the classic editor regardless of the Screen Options settings, under certain circumstances.

Types of changes

Move the filter after the checks that may early-exit.

`gutenberg_collect_meta_box_data()`: Do not add the filter to disable…
… hidden metaboxes until after the `gutenberg_can_edit_post` and `gutenberg_can_edit_post_type` checks have cleared.
@danielbachhuber

This comment has been minimized.

Show comment
Hide comment
@danielbachhuber

danielbachhuber Aug 22, 2018

Member

This can result in all hidden metaboxes being displayed in the classic editor regardless of the Screen Options settings, under certain circumstances.

How do I replicate these circumstances?

Member

danielbachhuber commented Aug 22, 2018

This can result in all hidden metaboxes being displayed in the classic editor regardless of the Screen Options settings, under certain circumstances.

How do I replicate these circumstances?

@pglewis

This comment has been minimized.

Show comment
Hide comment
@pglewis

pglewis Aug 22, 2018

Contributor

Easiest way is probably setup a gutenberg_can_edit_post_type filter for a custom post type, which would illustrate bailing after the the filter is set.

Contributor

pglewis commented Aug 22, 2018

Easiest way is probably setup a gutenberg_can_edit_post_type filter for a custom post type, which would illustrate bailing after the the filter is set.

@pglewis

This comment has been minimized.

Show comment
Hide comment
@pglewis

pglewis Aug 22, 2018

Contributor

Gutenberg may add the classic-editor GET param after saving, but the problem will still manifest on initial edit.

Contributor

pglewis commented Aug 22, 2018

Gutenberg may add the classic-editor GET param after saving, but the problem will still manifest on initial edit.

@danielbachhuber

👍 I've verified the existing behavior (show all hidden meta boxes) works as expected.

@danielbachhuber danielbachhuber merged commit 830c510 into WordPress:master Aug 22, 2018

2 checks passed

codecov/project 50.91% remains the same compared to 6b2e673
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment