Skip to content

Gutenberg 5.1.0: gutenberg_can_edit_post_type is deprecated since version 5.0.0! Use use_block_editor_for_post_type instead. #87

Closed

Description

@lkraav

Triggers on any classic screen, such as WooCommerce order

apply_filters('replace_editor')
wp-admin/post.php:173
gutenberg_init()
wp-includes/class-wp-hook.php:286
is_gutenberg_page()
wp-content/plugins/gutenberg/gutenberg.php:195
use_block_editor_for_post()
wp-content/plugins/gutenberg/gutenberg.php:122
apply_filters('use_block_editor_for_post')
wp-admin/includes/post.php:2093
Classic_Editor::choose_editor()
wp-includes/class-wp-hook.php:286
Classic_Editor::get_enabled_editors_for_post()
wp-content/plugins/classic-editor/classic-editor.php:578
Classic_Editor::get_enabled_editors_for_post_type()
wp-content/plugins/classic-editor/classic-editor.php:771
Classic_Editor::can_edit_post_type()
wp-content/plugins/classic-editor/classic-editor.php:736
gutenberg_can_edit_post_type()
wp-content/plugins/classic-editor/classic-editor.php:716
wp-includes/functions.php:4329

Activity

  1. bobbingwide commented on Feb 27, 2019

    @bobbingwide

    Workarounds

    • deactivate classic-editor
    • deactivate Gutenberg
    • revert to Gutenberg v5.0 or earlier
    • define( 'WP_DEBUG', false );

    Interesting that the message says deprecated since 5.0.0 but there's no message from that version!

  2. azaozz commented on Mar 21, 2019

    @azaozz
    Contributor

    Should be fixes as of 45ff568.

    It still checks if the function exists before using it to support older Gutenberg versions (it that needed?).

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions