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

Editor crashes when title support removed from "post" post type #29266

Closed
brandonpayton opened this issue Feb 23, 2021 · 2 comments
Closed

Editor crashes when title support removed from "post" post type #29266

brandonpayton opened this issue Feb 23, 2021 · 2 comments
Labels
[Type] Bug An existing feature does not function as intended

Comments

@brandonpayton
Copy link
Member

Description

When title support is removed from the "post" post type, the editor crashes when first clicked.

The crash appears to happen here:

const { activeElement, body } = ownerDocument;

Step-by-step reproduction instructions

Using a test site, add an mu-plugin with the following code:

<?php
function gh_crash_repro_remove_post_title_input() { remove_post_type_support('post', 'title'); }
add_action('init', 'gh_crash_repro_remove_post_title_input');

Try to create a new post with Gutenberg, click the editor after it loads, and observe the crash.

Expected behaviour

The editor would be usable without title support.

Actual behaviour

The editor crashes without title support.

Screenshots or screen recording (optional)

Gutenberg.10.0.2.Crash.Without.Title.Support.mp4

WordPress information

  • WordPress version: 5.6.2
  • Gutenberg version: 10.0.2
  • Are all plugins except Gutenberg deactivated? Yes
  • Are you using a default theme (e.g. Twenty Twenty-One)? No -- Using TwentyTwenty

Device information

  • Device: Macbook
  • Operating system: macOS Big Sur 11.2.1
  • Browser: Brave, Chrome, and Firefox
@brandonpayton brandonpayton added the [Type] Bug An existing feature does not function as intended label Feb 23, 2021
@skorasaurus
Copy link
Member

skorasaurus commented Feb 23, 2021

Thanks for reporting.
Worth noting that this maybe something specific to the post types of 'post' and 'page' (I'm able to replicate this error on the page post type as well) since registering a custom post type without title capabilities will load the editor as expected (although with other errors) - ref #26239

@ntsekouras
Copy link
Contributor

Fixed by: #29922

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

3 participants