Skip to content
This repository has been archived by the owner on Jun 14, 2022. It is now read-only.

Gutenberg error when opening style selection #67

Closed
strarsis opened this issue Mar 4, 2019 · 2 comments
Closed

Gutenberg error when opening style selection #67

strarsis opened this issue Mar 4, 2019 · 2 comments

Comments

@strarsis
Copy link

strarsis commented Mar 4, 2019

When opening the style selection (accordion in sidebar) for the AB Container block,
Gutenberg editor crashes and displays an error popup. Error message:

TypeError: Cannot read property 'innerBlocks' of null
    at t.value ([...]/app/plugins/gutenberg/build/editor/index.js?ver=1550716684:50:144165)
    at commitLifeCycles ([...]/app/plugins/gutenberg/vendor/react-dom.60482cc7.js:16085:22)
    at commitAllLifeCycles ([...]/app/plugins/gutenberg/vendor/react-dom.60482cc7.js:17386:7)
    at HTMLUnknownElement.callCallback ([...]/app/plugins/gutenberg/vendor/react-dom.60482cc7.js:143:14)
    at Object.invokeGuardedCallbackDev ([...]/app/plugins/gutenberg/vendor/react-dom.60482cc7.js:193:16)
    at invokeGuardedCallback ([...]/app/plugins/gutenberg/vendor/react-dom.60482cc7.js:250:31)
    at commitRoot ([...]/app/plugins/gutenberg/vendor/react-dom.60482cc7.js:17582:7)
    at completeRoot ([...]/app/plugins/gutenberg/vendor/react-dom.60482cc7.js:19036:3)
    at performWorkOnRoot ([...]/app/plugins/gutenberg/vendor/react-dom.60482cc7.js:18965:9)
    at performWork ([...]/app/plugins/gutenberg/vendor/react-dom.60482cc7.js:18873:7)

Two styles have been added to the AB Container block by theme (Border and Empty):

wp.domReady( () => {

  wp.blocks.registerBlockStyle( 'atomic-blocks/ab-container', {
    name: 'border',
    label: 'Border',
    isDefault: true,
  } );

  wp.blocks.registerBlockStyle( 'atomic-blocks/ab-container', {
    name: 'empty',
    label: 'Empty',
  } );

} );
@strarsis strarsis changed the title Gutenberg editor when opening style selection Gutenberg error when opening style selection Mar 4, 2019
@mikemcalister
Copy link
Contributor

Hi there,

I'm not having any issues with the AB container block itself. It seems like this is due to your addition to the block via the theme. Unfortunately, we can't troubleshoot your block additions at this time, but feel free to send over more info if you come across it.

@mikemcalister
Copy link
Contributor

Keep an eye on this ticket, as it outlines the Gutenberg core bug and its progress.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants