Skip to content

hasMetaBoxes selector returns true even when user has disabled all metaboxes from displaying  #52724

Closed

Description

@fabiankaegy

Description

The selector wp.data.select('core/edit-post').hasMetaBoxes() returns true even after a user has disabled all metaboxes from displaying via the display settings.

This issue is currently preventing the block editor from getting displayed in an iframe even when the metaboxes aren't actually displayed.

Step-by-step reproduction instructions

  1. Enable a plugin that loads a traditional metabox such as Yoast SEO
  2. Open the editor and disable all the metabox panels in the Settings -> Panels menu
  3. Open the browser console and run the wp.data.select('core/edit-post'). hasMetaBoxes() selector
  4. See that it still returns true.

Screenshots, screen recording, code snippet

No response

Environment info

  • WordPress 6.3 Beta 4
  • no gutenberg plugin
  • emptytheme

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

Activity

  1. added
    [Type] Bug
    [Feature] Meta Boxes
    on Jul 18, 2023
  2. youknowriad commented on Sep 14, 2023

    @youknowriad
    Contributor

    Yes, I don't think hasMetaBoxes mean hasVisibleMetaboxes in this case. It's more about the meta boxes that are sent from the server. That said, even if we had hasVisibleMetaboxes, I'm not sure that it would have been the right selector for the iframed editor because adding and removing the iframe when the value changes on the fly is a bit risky. (Re-rendering everything...)

  3. fabiankaegy commented on Apr 3, 2024

    @fabiankaegy
    MemberAuthor

    Thanks for that explanation. Closing this for now then 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Feature] Meta Boxes[Type] Bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions