-
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
Quick inserter breaks in block-editor package since addition of patterns #24525
Comments
I made some progress on this. I was able to determine that my
Core's value when clicking the inserter:
My
I made sure that my block-editor npm was updated to
Regardless of the reasons these are out of sync, I was able to resolve the issue by passing core's settings to my blockEditorProvider like this:
I just wanted to leave this here for anyone else having a similar issue! I'm not certain if this issue should be closed because of that out-of-sync-ness of the settings by default though. That seems like it's still a real problem, but I am not 100% sure. |
@johnstonphilip I think this may have been fixed by #24554. Does that look right to you? Possibly the fix hasn't been published yet. |
@talldan Yes that looks right! We can close this issue. Thanks 😊 |
Describe the bug
When using the
block-editor
package, the quick inserter breaks the page when you click on it with this error:TypeError: Cannot read property 'length' of undefined
and points to this line in quick-inserter.js:https://github.com/WordPress/gutenberg/blob/master/packages/block-editor/src/components/inserter/quick-inserter.js#L141
To reproduce
Steps to reproduce the behavior:
Set up a project which uses the
block-editor
as described in the readme here:https://github.com/WordPress/gutenberg/tree/master/packages/block-editor
View the page containing your custom block-editor, and attempt to click on the quick inserter button to add another block.
Notice the page crashes with the above error.
Expected behavior
The page does not crash.
To confirm this is a new issue, I rolled back my WordPress install to 5.4 and the inserter works fine, so it appears to be due to the addition of patterns.
Editor version (please complete the following information):
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: