-
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
Inserting a Classic block with the slash inserter crashes the editor if the sidebar is open #41321
Comments
I don't seem to be able to reproduce the issue here. Is there some other variable at play here? |
I'm trying to isolate the issue even more. I've just spun up a brand new site using Local and it crashes too. Not only when adding a new post but when adding it to the This is the error thrown in the console:
|
Testing with previous Gutenberg versions shows:
|
I'm not able to reproduce the issue. Tested with the following setups on Chrome.
@priethor, do you have any other plugins active? |
I don't, no plugins installed at all. |
|
@priethor I was able to reproduce this in the Site Editor using TwentyTwentyTwo:
Site.Editor.Classic.Block.movConsole outputs the error below.
|
@ryanwelcher, the Classic block isn't supported in Site Editor at the moment - #23086. Also, based on the @priethor screencast, the error isn't caught by the block error boundary. |
Yes, every single time.
Sure, the error is thrown at the var lk = function(e) {
let {blockClientId: t} = e;
const {updateBlockAttributes: n} = (0,
m.useDispatch)(qn)
, {activeBlockVariation: o, variations: l} = (0,
m.useSelect)((e=>{
const {getActiveBlockVariation: n, getBlockVariations: o} = e(r.store)
, {getBlockName: l, getBlockAttributes: i} = e(qn)
, a = t && l(t);
return {
activeBlockVariation: n(a, i(t)),
variations: a && o(a, "transform")
}
}
), [t])
, i = null == o ? void 0 : o.name
, s = (0,
a.useMemo)((()=>{
const e = new Set;
return l.forEach((t=>{
t.icon && e.add(t.icon)
}
)),
e.size === l.length
}
), [l]);
if (null == l || !l.length)
return null;
const c = s ? ok : rk;
return (0,
a.createElement)(c, {
className: "block-editor-block-variation-transforms",
onSelectVariation: e=>{
n(t, {
...l.find((t=>{
let {name: n} = t;
return n === e
}
)).attributes
})
}
,
selectedValue: i,
variations: l
})
} |
@youknowriad great context, I can confirm the sidebar needs to be open. Furthermore, testing with @ryanwelcher showed it only crashes when using the slash inserter; when using the normal inserter or the appender it works fine. |
I can also replicate this issue every time when adding the classic editor on a new page! However I found this post searching for an explanation to why I am seeing other blocks have unexpected errors, the other ones I can't find a way to replicate them yet the way you have with the classic editor. EDIT - One thing to clarify is that by "sidebar" @priethor is referring to the "Settings pane" NOT whether or not you are in "full screen mode" or not so the RIGHT sidebar, settings pane needs to be open to reproduce. |
Description
When adding a Classic block in an empty post, the editor crashes.
Step-by-step reproduction instructions
Screenshots, screen recording, code snippet
Grabacion.de.pantalla.2022-05-25.a.las.15.01.57.mov
Environment info
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
The text was updated successfully, but these errors were encountered: