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

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
lkraav opened this issue Feb 20, 2019 · 2 comments

Comments

@lkraav
Copy link

lkraav commented Feb 20, 2019

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
@bobbingwide
Copy link

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!

@azaozz
Copy link
Contributor

azaozz commented Mar 21, 2019

Should be fixes as of 45ff568.

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

@azaozz azaozz closed this as completed Mar 21, 2019
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

No branches or pull requests

3 participants