Automattic / isolated-block-editor

Repackages Gutenberg's editor playground as a full-featured multi-instance editor that does not require WordPress.
343 stars 50 forks source link

WP 6.3 compatibility: __experimentaluseLayoutClasses is not a function #229

Closed ryelle closed 1 year ago

ryelle commented 1 year ago

I'm trying to upgrade WordPress & Gutenberg on wordpress.org, and am running into a javascript error from blocks-everywhere, but I think I've tracked it down to this project.

The forums editor is perpetually loading, and the following error appears in console.

Screenshot 2023-07-10 at 1 34 15 PM
TypeError: _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__.__experimentaluseLayoutClasses is not a function
    VisualEditor visual-editor.js:204
    St react-dom.min.js:1
    $s react-dom.min.js:1
    Sl react-dom.min.js:1
    kl react-dom.min.js:1
    bl react-dom.min.js:1
    sl react-dom.min.js:1
    il react-dom.min.js:1
    v react.min.js:1
    ce react.min.js:1
    t react.min.js:1
    <anonymous> react.min.js:1
    <anonymous> react.min.js:1
react-dom.min.js:1:53535

Environment:

alshakero commented 1 year ago

For the next person who sees this. We're investigating this. And it's due to this change in Gutenberg.

https://github.com/WordPress/gutenberg/pull/51434

johngodley commented 1 year ago

I have fixes for this and a bunch of other issues, but it will take a bit of time to release through the chain. For now the only compatible version of Gutenberg is < 15.6, and the packages specified in package.json

alshakero commented 1 year ago

Hi John 👋🏼 That's great!

Do you have a rough timeline? This issue is blocking our project here: pdDR7T-OS-p2

We'd be happy to help review PRs, help deploy, etc..

tellthemachines commented 1 year ago

Unfortunately __experimentaluseLayoutClasses was never meant for public consumption, and being experimental means WP doesn't guarantee its continued availability or back-compat. It's now been made a private API.

Having said that, I'm interested in knowing more about this particular use case for the function, because if it's something that could be handy for extenders it could perhaps be made into a public API in the future. Whereabouts could I find out more about it?

johngodley commented 1 year ago

@alshakero can you not use a compatible version of Gutenberg - is there something specific you need from a recent version?

alshakero commented 1 year ago

@johngodley we're running this on wp.com, I have no control of the GB version there :(