-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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 Unrecoverably Crashes If Unregistering an In-Use Core Block #12484
Comments
We tested this during the core editor triage (https://wordpress.slack.com/archives/C02QB2JS7/p1564035774193100 - slack link, requires signup to slack). I was able to reproduce the issue. My hunch is that it might be related to the timing of when the block is unregistered. Potentially the editor has already loaded the post and thinks the verse block is available, thus it displays the block without issue. I'm not completely sure when the right time to unregister a block is, would have to look that up. I still think this is a bug though, so leaving open. |
By no means do I think this resolves the issue, but @mcshaman provided a helpful temporary workaround that hides blocks from the Inserter Menus but doesn't actually unregister them, thereby avoiding errors. |
This is also causing me issues. If a block is already present in the content, then you get a fatal error instead of a Like OP, I am calling |
As above. Noticing that when I try |
Help us move this issue forward. This issue is being marked stale since it has no activity after 15 days of requesting more information. Please add info requested so we can help move the issue forward. Note: The triage policy is to close stale issues that need more info and no response after 2 weeks. |
So I was still able to reproduce this. Not if the unregistering happens right on
It also doesn't crash immediately but any further interaction causes a The unregistered blocks still show in the block list but with no name When you focus the instance it disappears Also you can't save the post because that causes the The problem is that (if I remember correctly) directly running on So this is still broken. The workaround mentioned in #12484 (comment) still works though. |
Describe the bug
If I unregister a core block type has been previously used, the entire post unrecoverably crashes.
To Reproduce
Here's the JS I'm using to disable the Verse Block:
Error Details
Copy Error results:
Copy Post Text:
Attempt Recovery:
Nothing happens
Console:
Expected behavior
Post should display the "block doesn't exist" behavior for third-party blocks:
Desktop (please complete the following information):
Win 10, Firefox 63.0.3, 5.0-RC1-43947, Twenty Nineteen, Tiny plugin to deactivate Verse Block and a few others
The text was updated successfully, but these errors were encountered: