Skip to content

meta_box_cb parameter doesn't work on Post #13816

@rodrigoantonanasantex

Description

@rodrigoantonanasantex

Describe the bug
Register a taxonomy for a post with a custom panel UI doesn't work with Gutenberg editor but yes with the classic editor. Also, it works with another custom post type.

To Reproduce
Steps to reproduce the behavior:

  1. Register Taxonomy:
<?php
register_taxonomy(
            self::$taxonomy_name,
            array('post'),
            array(
                "meta_box_cb" => [$this,'taxonomy_select_meta_box'],
                'labels' => $labels,
                'public' => true,
                'show_ui' => true,
                'show_in_menu' => false,
                'show_in_rest' => true,
                'hierarchical' => true

            )
        );

 public function taxonomy_select_meta_box( $post, $box ){
        echo "<p>This will show up below the checkboxes that you are used to!</p>";
    }
  1. Go to the edit/create post page:
    The panel UI is not properly:
    image

  2. If I create a new post_type and go to the edit/create the new custom post type, the panel is showing properly:
    image

Desktop (please complete the following information):

  • OS: iOS
  • Browser: chrome
  • Version Version 71.0.3578.98 (Official Build) (64-bit)
  • WordPress 5.0.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions