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

Post editor crashes when clearing customizations in template editing mode. #44481

Closed
tellthemachines opened this issue Sep 27, 2022 · 0 comments · Fixed by #44482
Closed

Post editor crashes when clearing customizations in template editing mode. #44481

tellthemachines opened this issue Sep 27, 2022 · 0 comments · Fixed by #44482
Assignees
Labels
[Feature] Template Editing Mode Related to the template editor available in the Block Editor [Type] Bug An existing feature does not function as intended

Comments

@tellthemachines
Copy link
Contributor

Description

When editing the template for a new post from the post sidebar, saving changes to the template and then clicking "clear customizations" in the top toolbar causes the editor to crash.

I've reproduced this several times, and there are two different errors that alternately appear in the console:

Uncaught TypeError: Cannot read properties of null (reading 'removeEventListener') in the <BlockPopoverInbetween> component

and

Uncaught TypeError: Cannot read properties of null (reading 'title') in the BlockParentSelector component.

Step-by-step reproduction instructions

  1. Create a new post but don't publish it yet;
  2. In the post sidebar, in the "Template" dropdown, click "edit template";
  3. Make some changes to the template and save them;
  4. In the top toolbar, open "Template Options" dropdown and click "Clear customizations";
  5. Click "ok" in confirmation dialog and verify that editor crashes.

Screenshots, screen recording, code snippet

No response

Environment info

I can reproduce this both on Gutenberg trunk (running on 6.1-alpha-53810) and wordpress-develop trunk, so whatever is causing the issue must have already been backported to Core. I can't reproduce it on Gutenberg 14.1.1 running on WP 6.0.2.

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

@tellthemachines tellthemachines added [Type] Bug An existing feature does not function as intended [Feature] Template Editing Mode Related to the template editor available in the Block Editor labels Sep 27, 2022
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Sep 27, 2022
@glendaviesnz glendaviesnz moved this from Triage to In Progress in WordPress 6.1 Editor Tasks Sep 27, 2022
Repository owner moved this from In Progress to Done in WordPress 6.1 Editor Tasks Sep 28, 2022
@priethor priethor removed the [Status] In Progress Tracking issues with work in progress label Nov 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Template Editing Mode Related to the template editor available in the Block Editor [Type] Bug An existing feature does not function as intended
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

3 participants